internal protected NetworkFileSystem(INodeAddress rootAddress, FileSystemOptions options) : base(rootAddress, null, options) { var comparer = ObjectReferenceIdentityEqualityComparer <INetworkFileSystemClient> .Default; this.freeClients = new TimedReferenceDictionary <INetworkFileSystemClient, INetworkFileSystemClient>(TimeSpan.FromMinutes(25), comparer); this.freeClientsForBinaryAccess = new TimedReferenceDictionary <INetworkFileSystemClient, INetworkFileSystemClient>(TimeSpan.FromMinutes(25), comparer); lock (staticFileSystemsCache) { IList <NetworkFileSystemWeakReference> fileSystems; var uniqueId = this.GetUniqueId(); if (!staticFileSystemsCache.TryGetValue(uniqueId, out fileSystems)) { fileSystems = new List <NetworkFileSystemWeakReference>(); staticFileSystemsCache[GetUniqueId()] = fileSystems; } fileSystems.Add(new NetworkFileSystemWeakReference(this)); } }
internal protected NetworkFileSystem(INodeAddress rootAddress, FileSystemOptions options) : base(rootAddress, null, options) { var comparer = ObjectReferenceIdentityEqualityComparer<INetworkFileSystemClient>.Default; this.freeClients = new TimedReferenceDictionary<INetworkFileSystemClient, INetworkFileSystemClient>(TimeSpan.FromMinutes(25), comparer); this.freeClientsForBinaryAccess = new TimedReferenceDictionary<INetworkFileSystemClient, INetworkFileSystemClient>(TimeSpan.FromMinutes(25), comparer); lock (staticFileSystemsCache) { IList<NetworkFileSystemWeakReference> fileSystems; var uniqueId = this.GetUniqueId(); if (!staticFileSystemsCache.TryGetValue(uniqueId, out fileSystems)) { fileSystems = new List<NetworkFileSystemWeakReference>(); staticFileSystemsCache[GetUniqueId()] = fileSystems; } fileSystems.Add(new NetworkFileSystemWeakReference(this)); } }