Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="SortedDictionaryEnumerator" /> class.
 /// </summary>
 public SortedDictionaryEnumerator(SortedDictionary dict,
                                   EnumeratorMode mode)
 {
     m_dict       = dict;
     m_enumerator = dict.GetBaseEnumerator();
     m_mode       = mode;
 }
Exemple #2
0
 public Enumerator(SortedList host, EnumeratorMode mode)
 {
     this.host = host;
     stamp     = host.modificationCount;
     size      = host.Count;
     this.mode = mode;
     Reset();
 }
Exemple #3
0
 public Enumerator(Hashtable host, EnumeratorMode mode)
 {
     this.host = host;
     stamp     = host.modificationCount;
     size      = host.table.Length;
     this.mode = mode;
     Reset();
 }
Exemple #4
0
 public DictionaryEnumerator([NotNull] SortedList <TKey, TValue> host, EnumeratorMode mode)
 {
     this.host = host;
     stamp     = host.modificationCount;
     size      = host.Count;
     this.mode = mode;
     Reset();
 }
Exemple #5
0
 public Enumerator(MonoSortedList<TKey, TValue> host, EnumeratorMode mode)
 {
     this.host = host;
     stamp = host.modificationCount;
     size = host.Count;
     this.mode = mode;
     Reset();
 }
Exemple #6
0
        private void  CopyToArray(Array arr, int i,
                                  EnumeratorMode mode)
        {
            IEnumerator it = new Enumerator(this, mode);

            while (it.MoveNext())
            {
                arr.SetValue(it.Current, i++);
            }
        }
Exemple #7
0
        private void CopyToArray([NotNull] Array arr, int i,
                       EnumeratorMode mode)
        {
            if (arr == null)
                throw new ArgumentNullException(nameof(arr));

            if (i < 0 || i + this.Count > arr.Length)
                throw new ArgumentOutOfRangeException(nameof(i));

            IEnumerator it = new DictionaryEnumerator(this, mode);

            while (it.MoveNext())
            {
                arr.SetValue(it.Current, i++);
            }
        }
        private void CopyToArray(Array arr, int i, EnumeratorMode mode)
        {
            if (arr == null)
            {
                throw new ArgumentNullException("arr");
            }

            if (i < 0 || i + Count > arr.Length)
            {
                throw new ArgumentOutOfRangeException("i");
            }

            IEnumerator it = new Enumerator(this, mode);

            while (it.MoveNext())
            {
                arr.SetValue(it.Current, i++);
            }
        }
Exemple #9
0
			public Enumerator (SortedList host, EnumeratorMode mode)
			{
				this.host = host;
				stamp = host.modificationCount;
				size = host.Count;
				this.mode = mode;
				Reset ();
			}
Exemple #10
0
		private void  CopyToArray (Array arr, int i, 
					   EnumeratorMode mode)
		{
			if (arr == null)
				throw new ArgumentNullException ("arr");

			if (i < 0 || i + this.Count > arr.Length)
				throw new ArgumentOutOfRangeException ("i");
			
			IEnumerator it = new Enumerator (this, mode);

			while (it.MoveNext ()) {
				arr.SetValue (it.Current, i++);
			}
		}
Exemple #11
0
			public Enumerator (Hashtable host, EnumeratorMode mode) {
				this.host = host;
				stamp = host.modificationCount;
				size = host.table.Length;
				this.mode = mode;
				Reset ();
			}
Exemple #12
0
		private void  CopyToArray (Array arr, int i,
					   EnumeratorMode mode)
		{
			IEnumerator it = new Enumerator (this, mode);

			while (it.MoveNext ()) {
				arr.SetValue (it.Current, i++);
			}
		}