Exemple #1
0
            public CStream Push <TKey, TValue>(CMultiMap <TKey, TValue> Data_)
            {
                Push(Data_.Count);
                foreach (var i in Data_)
                {
                    Push(i);
                }

                return(this);
            }
Exemple #2
0
            public JsonDataArray Pop <TKey, TValue>(int Index_, CMultiMap <TKey, TValue> Data_) where TKey : new() where TValue : new()
            {
                var Collection = (JsonDataArray)_Array[Index_];

                for (int i = 0; i < Collection.Count; ++i)
                {
                    var Key = new TKey();
                    Collection.Pop(i, ref Key);
                    Data_.Add(Key, new TValue());
                }

                return(this);
            }
Exemple #3
0
            public JsonDataArray Pop <TKey>(int Index_, CMultiMap <TKey, string> Data_) where TKey : new() // Pop<TValue> 에서 where TValue : new() 조건이 필요하고, string 은 new 불가하므로 overloading 필요
            {
                var Collection = (JsonDataArray)_Array[Index_];

                for (int i = 0; i < Collection.Count; ++i)
                {
                    var Key = new TKey();
                    Collection.Pop(i, ref Key);
                    Data_.Add(Key, "");
                }

                return(this);
            }
Exemple #4
0
            protected JsonDataArray Push <TKey, TValue>(CMultiMap <TKey, TValue> Data_)
            {
                var Collection = new JsonDataArray();

                foreach (var i in Data_)
                {
                    Collection.Push(i.Key);
                }

                _Array.Add(Collection);

                return(this);
            }
Exemple #5
0
            public CStream Pop <TKey, TValue>(CMultiMap <TKey, TValue> Data_) where TKey : new() where TValue : new()
            {
                int Cnt = 0;

                Pop(ref Cnt);
                for (int i = 0; i < Cnt; ++i)
                {
                    var Key   = new TKey();
                    var Value = new TValue();
                    Pop(ref Key);
                    Pop(ref Value);
                    Data_.Add(Key, Value);
                }

                return(this);
            }
Exemple #6
0
            public CStream Pop <TKey>(CMultiMap <TKey, string> Data_) where TKey : new() // Pop<TValue> 에서 where TValue : new() 조건이 필요하고, string 은 new 불가하므로 overloading 필요
            {
                int Cnt = 0;

                Pop(ref Cnt);
                for (int i = 0; i < Cnt; ++i)
                {
                    var    Key   = new TKey();
                    string Value = "";
                    Pop(ref Key);
                    Pop(ref Value);
                    Data_.Add(Key, Value);
                }

                return(this);
            }
Exemple #7
0
            public CStream Pop <TValue>(CMultiMap <string, TValue> Data_) where TValue : new() // Pop<TValue> 에서 where TValue : new() 조건이 필요하고, string 은 new 불가하므로 overloading 필요
            {
                int Cnt = 0;

                Pop(ref Cnt);
                for (int i = 0; i < Cnt; ++i)
                {
                    string Key   = "";
                    var    Value = new TValue();
                    Pop(ref Key);
                    Pop(ref Value);
                    Data_.Add(Key, Value);
                }

                return(this);
            }
Exemple #8
0
 public JsonDataObject Push <TKey, TValue>(string Name_, CMultiMap <TKey, TValue> Data_)
 {
     Add(Name_);
     Push(Data_);
     return(this);
 }