Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SynchEnumerator.cs
1using System;
3using System.Threading.Tasks;
4
6{
11 {
12 private readonly IEnumerator e;
13
18 public SynchEnumerator(IEnumerator e)
19 {
20 this.e = e;
21 }
22
26 public object Current => this.e.Current;
27
31 public void Dispose()
32 {
33 if (this.e is IDisposable Disposable)
34 Disposable.Dispose();
35 }
36
41 public bool MoveNext()
42 {
43 return this.e.MoveNext();
44 }
45
50 public Task<bool> MoveNextAsync()
51 {
52 return Task.FromResult(this.e.MoveNext());
53 }
54
58 public void Reset()
59 {
60 this.e.Reset();
61 }
62 }
63}
SynchEnumerator(IEnumerator e)
Synchronous enumerator
Task< bool > MoveNextAsync()
Tries to move to next item.