Пример #1
0
        protected static global::YuzuTest.SampleDictKeys Clone_YuzuTest__SampleDictKeys(Cloner cl, object src)
        {
            if (src == null)
            {
                return(null);
            }
            if (src.GetType() != typeof(global::YuzuTest.SampleDictKeys))
            {
                return((global::YuzuTest.SampleDictKeys)cl.DeepObject(src));
            }
            var s      = (global::YuzuTest.SampleDictKeys)src;
            var result = new global::YuzuTest.SampleDictKeys();

            if (s.E != null)
            {
                result.E = new global::System.Collections.Generic.Dictionary <global::YuzuTest.SampleEnum, int>();
                foreach (var tmp1 in s.E)
                {
                    result.E.Add(tmp1.Key, tmp1.Value);
                }
            }
            if (s.I != null)
            {
                result.I = new global::System.Collections.Generic.Dictionary <int, int>();
                foreach (var tmp2 in s.I)
                {
                    result.I.Add(tmp2.Key, tmp2.Value);
                }
            }
            if (s.K != null)
            {
                result.K = new global::System.Collections.Generic.Dictionary <global::YuzuTest.SampleKey, int>();
                var tmp4 = cl.GetCloner <global::YuzuTest.SampleKey>();
                foreach (var tmp3 in s.K)
                {
                    result.K.Add((global::YuzuTest.SampleKey)tmp4(tmp3.Key), tmp3.Value);
                }
            }
            return(result);
        }
Пример #2
0
        protected static global::YuzuTest.SampleMatrix Clone_YuzuTest__SampleMatrix(Cloner cl, object src)
        {
            if (src == null)
            {
                return(null);
            }
            if (src.GetType() != typeof(global::YuzuTest.SampleMatrix))
            {
                return((global::YuzuTest.SampleMatrix)cl.DeepObject(src));
            }
            var s      = (global::YuzuTest.SampleMatrix)src;
            var result = new global::YuzuTest.SampleMatrix();

            if (s.M != null)
            {
                result.M = new global::System.Collections.Generic.List <global::System.Collections.Generic.List <int> >();
                var tmp2 = cl.GetCloner <global::System.Collections.Generic.List <int> >();
                foreach (var tmp1 in s.M)
                {
                    result.M.Add((global::System.Collections.Generic.List <int>)tmp2(tmp1));
                }
            }
            return(result);
        }