private static WriteAsyncInternal ( |
||
_this | ||
value | char | |
charBuffer | char | |
charPos | int | |
charLen | int | |
coreNewLine | char | |
autoFlush | bool | |
appendNewLine | bool | |
Résultat | System.Threading.Tasks.Task |
public override Task WriteLineAsync(char[] buffer, int index, int count) { if (buffer == null) { throw new ArgumentNullException("buffer", Environment.GetResourceString("ArgumentNull_Buffer")); } if (index < 0) { throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); } if (count < 0) { throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum")); } if (buffer.Length - index < count) { throw new ArgumentException(Environment.GetResourceString("Argument_InvalidOffLen")); } if (this.GetType() != typeof(StreamWriter)) { return(base.WriteLineAsync(buffer, index, count)); } if (this.stream == null) { __Error.WriterClosed(); } this.CheckAsyncTaskInProgress(); Task task = StreamWriter.WriteAsyncInternal(this, buffer, index, count, this.charBuffer, this.charPos, this.charLen, this.CoreNewLine, this.autoFlush, true); this._asyncWriteTask = task; return(task); }
public override Task WriteLineAsync(string value) { if (this.GetType() != typeof(StreamWriter)) { return(base.WriteLineAsync(value)); } if (this.stream == null) { __Error.WriterClosed(); } this.CheckAsyncTaskInProgress(); Task task = StreamWriter.WriteAsyncInternal(this, value, this.charBuffer, this.charPos, this.charLen, this.CoreNewLine, this.autoFlush, true); this._asyncWriteTask = task; return(task); }