protected override ITapeStream InitializeAndGetTapeStorage()
        {
            _storageFactory = new MemoryTapeStorageFactory(_storage, "default");

            const string name = "Memory";
            return _storageFactory.GetOrCreateStream(name);
        }
示例#2
0
 /// <summary>
 /// Creates memory-based tape storage factory, using the provided concurrent dictionary.
 /// </summary>
 /// <param name="dictionary">The dictionary.</param>
 /// <returns></returns>
 public static MemoryTapeStorageFactory CreateTape(this MemoryAccount account, string container = "tapes")
 {
     var factory = new MemoryTapeStorageFactory(account.Tapes, container);
     factory.InitializeForWriting();
     return factory;
 }
 protected override void FreeResources()
 {
     _storageFactory = null;
 }