예제 #1
0
            /// <summary>
            /// Initializes a new instance of the KoderHack.MultiValueSortedDictionary&lt;TKey,TValue&gt;.ValueCollection
            /// class that reflects the values in the specified KoderHack.MultiValueSortedDictionary&lt;TKey,TValue&gt;.
            /// </summary>
            /// <param name="dictionary">
            /// The KoderHack.MultiValueSortedDictionary&lt;TKey,TValue&gt; whose values
            /// are reflected in the new KoderHack.MultiValueSortedDictionary&lt;TKey,TValue&gt;.ValueCollection.
            /// </param>
            /// <exception cref="System.ArgumentNullException">
            /// dictionary is null.
            /// </exception>
            public ValueCollection([NotNull] MultiValueSortedDictionary <TKey, TValue> dictionary)
            {
                if (dictionary == null)
                {
                    throw new ArgumentNullException();
                }

                _Dictionary = dictionary;
                //foreach (KeyValuePair<TKey, List<TValue>> pair in dictionary._SortedDictionary)
                //    _values.AddRange(pair.Value);
            }
예제 #2
0
            public Enumerator([NotNull] MultiValueSortedDictionary <TKey, TValue> dictionary)
            {
                if (dictionary == null)
                {
                    throw new ArgumentNullException(nameof(dictionary));
                }

                _Dictionary    = dictionary;
                _Enumerator1   = dictionary._SortedDictionary.GetEnumerator();
                _Enumerator2   = null;
                DefaultCurrent = new KeyValuePair <TKey, TValue>(default(TKey), default(TValue));
                _Current       = DefaultCurrent;
                //_Disposed = false;
                _Valid = true;
            }
예제 #3
0
 internal Enumerator(MultiValueSortedDictionary <TKey, TValue> dictionary)
 {
     _Dictionary = dictionary;
     _Enumerator = new MultiValueSortedDictionary <TKey, TValue> .Enumerator(_Dictionary);
 }