Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ConsoleInReadToEnd.cs
1using System;
2using System.Threading.Tasks;
3
5{
10 {
11 private readonly TaskCompletionSource<string> result;
12
17 public ConsoleInReadToEnd(TaskCompletionSource<string> Result)
18 {
19 this.result = Result;
20 }
21
25 public override async Task Execute()
26 {
27 try
28 {
29 string Data = await System.Console.In.ReadToEndAsync();
30 this.result.TrySetResult(Data);
31 }
32 catch (Exception ex)
33 {
34 this.result.TrySetException(ex);
35 }
36 }
37 }
38}
override async Task Execute()
Executes the console operation.
ConsoleInReadToEnd(TaskCompletionSource< string > Result)
Reads a line from the console.
Manages a Console operation.
Definition: WorkItem.cs:9