using System.Threading.Tasks; using NadekoBot.Core.Services; using System.Collections.Concurrent; using NadekoBot.Modules.Gambling.Common.AnimalRacing; namespace NadekoBot.Modules.Gambling.Services { public class AnimalRaceService : INService, IUnloadableService { public ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); public Task Unload() { foreach (var kvp in AnimalRaces) { try { kvp.Value.Dispose(); } catch { } } return Task.CompletedTask; } } }