Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.IO.StreamWriter Class Reference

Public Member Functions

 StreamWriter (Stream stream)
 
 StreamWriter (Stream stream, Encoding encoding)
 
 StreamWriter (Stream stream, Encoding encoding, int bufferSize)
 
 StreamWriter (Stream stream, Encoding? encoding=null, int bufferSize=-1, bool leaveOpen=false)
 
 StreamWriter (string path)
 
 StreamWriter (string path, bool append)
 
 StreamWriter (string path, bool append, Encoding encoding)
 
 StreamWriter (string path, bool append, Encoding encoding, int bufferSize)
 
 StreamWriter (string path, FileStreamOptions options)
 
 StreamWriter (string path, Encoding encoding, FileStreamOptions options)
 
override void Close ()
 
override ValueTask DisposeAsync ()
 
override void Flush ()
 
override void Write (char value)
 
override void Write (char[]? buffer)
 
override void Write (char[] buffer, int index, int count)
 
override void Write (ReadOnlySpan< char > buffer)
 
override void Write (string? value)
 
override void WriteLine (string? value)
 
override void WriteLine (ReadOnlySpan< char > buffer)
 
override void Write (string format, object? arg0)
 
override void Write (string format, object? arg0, object? arg1)
 
override void Write (string format, object? arg0, object? arg1, object? arg2)
 
override void Write (string format, params object?[] arg)
 
override void WriteLine (string format, object? arg0)
 
override void WriteLine (string format, object? arg0, object? arg1)
 
override void WriteLine (string format, object? arg0, object? arg1, object? arg2)
 
override void WriteLine (string format, params object?[] arg)
 
override Task WriteAsync (char value)
 
override Task WriteAsync (string? value)
 
override Task WriteAsync (char[] buffer, int index, int count)
 
override Task WriteAsync (ReadOnlyMemory< char > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override Task WriteLineAsync ()
 
override Task WriteLineAsync (char value)
 
override Task WriteLineAsync (string? value)
 
override Task WriteLineAsync (char[] buffer, int index, int count)
 
override Task WriteLineAsync (ReadOnlyMemory< char > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override Task FlushAsync ()
 
void Dispose ()
 
virtual void Write (bool value)
 
virtual void Write (int value)
 
virtual void Write (uint value)
 
virtual void Write (long value)
 
virtual void Write (ulong value)
 
virtual void Write (float value)
 
virtual void Write (double value)
 
virtual void Write (decimal value)
 
virtual void Write (object? value)
 
virtual void Write (StringBuilder? value)
 
virtual void WriteLine ()
 
virtual void WriteLine (char value)
 
virtual void WriteLine (char[]? buffer)
 
virtual void WriteLine (char[] buffer, int index, int count)
 
virtual void WriteLine (bool value)
 
virtual void WriteLine (int value)
 
virtual void WriteLine (uint value)
 
virtual void WriteLine (long value)
 
virtual void WriteLine (ulong value)
 
virtual void WriteLine (float value)
 
virtual void WriteLine (double value)
 
virtual void WriteLine (decimal value)
 
virtual void WriteLine (StringBuilder? value)
 
virtual void WriteLine (object? value)
 
virtual Task WriteAsync (StringBuilder? value, CancellationToken cancellationToken=default(CancellationToken))
 
Task WriteAsync (char[]? buffer)
 
virtual Task WriteLineAsync (StringBuilder? value, CancellationToken cancellationToken=default(CancellationToken))
 
Task WriteLineAsync (char[]? buffer)
 
object GetLifetimeService ()
 
virtual object InitializeLifetimeService ()
 

Static Public Member Functions

static TextWriter Synchronized (TextWriter writer)
 

Static Public Attributes

static new readonly StreamWriter Null = new StreamWriter(Stream.Null, UTF8NoBOM, 128, leaveOpen: true)
 

Protected Member Functions

override void Dispose (bool disposing)
 
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Protected Attributes

char[] CoreNewLine = s_coreNewLine
 

Properties

static Encoding UTF8NoBOM [get]
 
virtual bool AutoFlush [get, set]
 
virtual Stream BaseStream [get]
 
override Encoding Encoding [get]
 
virtual IFormatProvider FormatProvider [get]
 
virtual string NewLine [get, set]
 

Private Member Functions

void CheckAsyncTaskInProgress ()
 
void CloseStreamFromDispose (bool disposing)
 
async ValueTask DisposeAsyncCore ()
 
void Flush (bool flushStream, bool flushEncoder)
 
unsafe void WriteSpan (ReadOnlySpan< char > buffer, bool appendNewLine)
 
void WriteFormatHelper (string format, ParamsArray args, bool appendNewLine)
 
async Task WriteAsyncInternal (char value, bool appendNewLine)
 
async Task WriteAsyncInternal (ReadOnlyMemory< char > source, bool appendNewLine, CancellationToken cancellationToken)
 
Task FlushAsyncInternal (bool flushStream, bool flushEncoder, CancellationToken cancellationToken=default(CancellationToken))
 
void ThrowIfDisposed ()
 

Static Private Member Functions

static void ThrowAsyncIOInProgress ()
 
static Stream ValidateArgsAndOpenPath (string path, Encoding encoding, FileStreamOptions options)
 
static Stream ValidateArgsAndOpenPath (string path, bool append, Encoding encoding, int bufferSize)
 
static void ValidateArgs (string path, Encoding encoding)
 

Private Attributes

readonly Stream _stream
 
readonly Encoding _encoding
 
readonly Encoder _encoder
 
byte[] _byteBuffer
 
readonly char[] _charBuffer
 
int _charPos
 
int _charLen
 
bool _autoFlush
 
bool _haveWrittenPreamble
 
readonly bool _closable
 
bool _disposed
 
Task _asyncWriteTask = Task.CompletedTask
 
string CoreNewLineStr = "\r\n"
 
readonly IFormatProvider _internalFormatProvider
 

Static Private Attributes

static readonly char[] s_coreNewLine = "\r\n".ToCharArray()
 

Detailed Description

Definition at line 10 of file StreamWriter.cs.


The documentation for this class was generated from the following file: