Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DictionaryEnumerator.cs
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5
7{
11 public class DictionaryEnumerator : IEnumerator<KeyValuePair<string, object>>
12 {
13 private readonly IEnumerable<DictionaryEntry> entries;
14 private readonly IEnumerator<DictionaryEntry> e;
15
16 internal DictionaryEnumerator(IEnumerable<DictionaryEntry> Entries)
17 {
18 this.entries = Entries;
19 this.e = this.entries.GetEnumerator();
20 }
21
25 public KeyValuePair<string, object> Current => new KeyValuePair<string, object>(this.e.Current.Key, this.e.Current.Value);
26
30 object IEnumerator.Current => new KeyValuePair<string, object>(this.e.Current.Key, this.e.Current.Value);
31
35 public void Dispose()
36 {
37 this.e.Dispose();
38 }
39
43 public bool MoveNext()
44 {
45 return this.e.MoveNext();
46 }
47
51 public void Reset()
52 {
53 this.e.Reset();
54 }
55 }
56}
KeyValuePair< string, object > Current
IEnumerator<T>.Current