Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteLineAsync() [3/7]

override Task System.IO.StreamWriter.WriteLineAsync ( char[] buffer,
int index,
int count )
inlinevirtual

Reimplemented from System.IO.TextWriter.

Definition at line 733 of file StreamWriter.cs.

734 {
735 if (buffer == null)
736 {
737 throw new ArgumentNullException("buffer", SR.ArgumentNull_Buffer);
738 }
739 if (index < 0)
740 {
741 throw new ArgumentOutOfRangeException("index", SR.ArgumentOutOfRange_NeedNonNegNum);
742 }
743 if (count < 0)
744 {
745 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum);
746 }
747 if (buffer.Length - index < count)
748 {
749 throw new ArgumentException(SR.Argument_InvalidOffLen);
750 }
751 if (GetType() != typeof(StreamWriter))
752 {
753 return base.WriteLineAsync(buffer, index, count);
754 }
757 return _asyncWriteTask = WriteAsyncInternal(new ReadOnlyMemory<char>(buffer, index, count), appendNewLine: true, default(CancellationToken));
758 }
async Task WriteAsyncInternal(char value, bool appendNewLine)
StreamWriter(Stream stream)

References System.IO.StreamWriter._asyncWriteTask, System.SR.Argument_InvalidOffLen, System.SR.ArgumentNull_Buffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.buffer, System.IO.StreamWriter.CheckAsyncTaskInProgress(), System.count, System.index, System.IO.StreamWriter.ThrowIfDisposed(), and System.IO.StreamWriter.WriteAsyncInternal().