Пример #1
0
 public void DisposeAsync_ClosesStream()
 {
     using (var manager = new UmsManager(FileAccess.Write, 1000))
     {
         UnmanagedMemoryStream stream = manager.Stream;
         Assert.True(stream.CanWrite);
         Assert.True(stream.DisposeAsync().IsCompletedSuccessfully);
         Assert.False(stream.CanWrite);
     }
 }