Extension methods for use with
Stream
.
- Namespace
- Statiq
.Common - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["StreamExtensions"]
class Type type-node
Syntax
public static class StreamExtensions
Methods
Name | Return Value | Summary |
---|---|---|
CopyToAsync |
Task |
Copies a
Stream to a System.IO.TextWriter using a buffer and leaves the stream
open after copying.
static
|
GetWriter |
StreamWriter |
Creates a
StreamWriter for the specified stream. The
biggest difference between this and creating a StreamWriter
directly is that the new StreamWriter will default to
leaving the underlying stream open on disposal. Remember to flush the
returned writer after all data have been written.
static
|