You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Shuttle.Core.Streams/StreamExtensions.cs
+23-30Lines changed: 23 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
usingSystem;
1
2
usingSystem.IO;
2
3
usingShuttle.Core.Contract;
3
4
@@ -19,46 +20,38 @@ public static byte[] ToBytes(this Stream stream)
19
20
}
20
21
21
22
/// <summary>
22
-
/// Copies the stream to a new MemoryStream object without copying the internal buffer.
23
-
/// This method returning the same result as the <see cref="Copy"/> method when the instance it not a <see cref="MemoryStream"/>
23
+
/// Returns a copy of the given stream. The underlying type used is a `MemoryStream` and if the given `stream` is a `MemoryStream` the operation will attempt to use internal buffer if exposed and return a read-only stream; else a standard `MemoryStream` is used and the `stream` data copied to the that.
0 commit comments