예제 #1
0
            public __Enumerator(__Dictionary <TKey, TValue> e)
            {
                if (e == null)
                {
                    return;
                }

                var a = new global::System.Collections.Generic.List <KeyValuePair <TKey, TValue> >();

                var Keys = (ICollection <TKey>)e.Keys;

                // tested by
                // X:\jsc.svn\examples\actionscript\Test\TestDictionaryOfTypeAndFunc\TestDictionaryOfTypeAndFunc\ApplicationCanvas.cs
                Func <TKey, KeyValuePair <TKey, TValue> > initobj =
                    xKey => new KeyValuePair <TKey, TValue>(xKey, e[xKey]);


                foreach (var Key in Keys)
                {
                    // Tested by X:\jsc.svn\examples\actionscript\Test\TestDictionaryKeys\TestDictionaryKeys\ApplicationCanvas.cs

                    var kv = initobj(Key);

                    // structs moving out out of scope must make a copy of themselves!
                    a.Add(kv);
                }


                this.list = a.GetEnumerator();
            }
 public new global::System.Collections.Generic.IEnumerator <global::Debugging.IssueTests.Email> GetEnumerator()
 {
     global::System.Collections.Generic.List <global::Debugging.IssueTests.Email> list = new global::System.Collections.Generic.List <global::Debugging.IssueTests.Email>(base.Count);
     global::System.Collections.IEnumerator iter = base.GetEnumerator();
     for (; iter.MoveNext();)
     {
         list.Add(((global::Debugging.IssueTests.Email)(iter.Current)));
     }
     return(list.GetEnumerator());
 }
예제 #3
0
 public new global::System.Collections.Generic.IEnumerator <global::WeText.Common.Config.ServiceElement> GetEnumerator()
 {
     global::System.Collections.Generic.List <global::WeText.Common.Config.ServiceElement> list = new global::System.Collections.Generic.List <global::WeText.Common.Config.ServiceElement>(base.Count);
     global::System.Collections.IEnumerator iter = base.GetEnumerator();
     for (; iter.MoveNext();)
     {
         list.Add(((global::WeText.Common.Config.ServiceElement)(iter.Current)));
     }
     return(list.GetEnumerator());
 }
예제 #4
0
            public __Enumerator(__Dictionary <TKey, TValue> e)
            {
                if (e == null)
                {
                    return;
                }

                global::System.Collections.Generic.List <KeyValuePair <TKey, TValue> > a = new global::System.Collections.Generic.List <KeyValuePair <TKey, TValue> >();

                foreach (var v in e.Keys)
                {
                    a.Add(new KeyValuePair <TKey, TValue>(v, e[v]));
                }

                this.list = a.GetEnumerator();
            }
예제 #5
0
            public __Enumerator(Dictionary <TKey, TValue> e)
            {
                if (e == null)
                {
                    return;
                }

                var a = new global::System.Collections.Generic.List <KeyValuePair <TKey, TValue> >();

                var Keys = (ICollection <TKey>)e.Keys;

                foreach (var Key in Keys)
                {
                    // Tested by X:\jsc.svn\examples\actionscript\Test\TestDictionaryKeys\TestDictionaryKeys\ApplicationCanvas.cs

                    var kv = new KeyValuePair <TKey, TValue>(Key, e[Key]);

                    a.Add(kv);
                }


                this.list = a.GetEnumerator();
            }