Пример #1
0
 /// <summary>
 /// Opens or creates a stream, initializing with bytes 0xFF if <paramref name="initialDataSize"/> is greater than zero.
 /// </summary>
 /// <param name="storageLocation">Location of the stream.</param>
 /// <param name="initialDataSize">Initial data size of the stream (in bytes).</param>
 /// <returns>The stream, initialized.</returns>
 /// <remarks>The capacity of the stream will be rounded up to the nearest multiple of 64 bytes.</remarks>
 public Stream OpenOrCreate(string storageLocation, int initialDataSize)
 {
     lock (FileSystem)
     {
         return(TestStorageStream.OpenOrCreate(FileSystem, storageLocation, initialDataSize));
     }
 }
Пример #2
0
 /// <inheritdoc />
 public Stream Open(string storageLocation)
 {
     lock (FileSystem)
     {
         return(TestStorageStream.OpenOrCreate(FileSystem, storageLocation, -1));
     }
 }