From 2ca4b7d03adfa3cc7c9c6a597a11762142d5b34b Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Mon, 4 Mar 2013 00:43:06 -0500 Subject: Created IConfigurationManager --- MediaBrowser.Common/Kernel/ResourcePool.cs | 79 ------------------------------ 1 file changed, 79 deletions(-) delete mode 100644 MediaBrowser.Common/Kernel/ResourcePool.cs (limited to 'MediaBrowser.Common/Kernel/ResourcePool.cs') diff --git a/MediaBrowser.Common/Kernel/ResourcePool.cs b/MediaBrowser.Common/Kernel/ResourcePool.cs deleted file mode 100644 index 8a2ab8af8..000000000 --- a/MediaBrowser.Common/Kernel/ResourcePool.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Threading; - -namespace MediaBrowser.Common.Kernel -{ - /// - /// This is just a collection of semaphores to control the number of concurrent executions of various resources - /// - public class ResourcePool : IDisposable - { - /// - /// You tube - /// - public readonly SemaphoreSlim YouTube = new SemaphoreSlim(5, 5); - - /// - /// The trakt - /// - public readonly SemaphoreSlim Trakt = new SemaphoreSlim(5, 5); - - /// - /// The tv db - /// - public readonly SemaphoreSlim TvDb = new SemaphoreSlim(5, 5); - - /// - /// The movie db - /// - public readonly SemaphoreSlim MovieDb = new SemaphoreSlim(5, 5); - - /// - /// The fan art - /// - public readonly SemaphoreSlim FanArt = new SemaphoreSlim(5, 5); - - /// - /// The mb - /// - public readonly SemaphoreSlim Mb = new SemaphoreSlim(5, 5); - - /// - /// Apple doesn't seem to like too many simulataneous requests. - /// - public readonly SemaphoreSlim AppleTrailerVideos = new SemaphoreSlim(1, 1); - - /// - /// The apple trailer images - /// - public readonly SemaphoreSlim AppleTrailerImages = new SemaphoreSlim(1, 1); - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Releases unmanaged and - optionally - managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - protected virtual void Dispose(bool dispose) - { - if (dispose) - { - YouTube.Dispose(); - Trakt.Dispose(); - TvDb.Dispose(); - MovieDb.Dispose(); - FanArt.Dispose(); - Mb.Dispose(); - AppleTrailerVideos.Dispose(); - AppleTrailerImages.Dispose(); - } - } - } -} -- cgit v1.2.3