3using System.Threading.Tasks;
13 private readonly TaskCompletionSource<int> result;
14 private readonly
char[] buffer;
15 private readonly
int index;
16 private readonly
int count;
43 public override async Task
Execute(CancellationToken Cancel)
47 int Result = await
System.Console.In.ReadBlockAsync(this.buffer, this.index, this.count);
48 this.result.TrySetResult(Result);
52 this.result.TrySetException(ex);
Reads a block of characters from the console.
ConsoleInReadBlock(char[] Buffer, int Index, int Count, TaskCompletionSource< int > Result)
Reads a block of characters from the console.
override async Task Execute(CancellationToken Cancel)
Executes the console operation.
Represents an asynchronous operation to be performed.