public TestType(bool v1, sbyte v2, short v3, int v4, long v5, float v6, double v7, Octets v8, string v9, ICollection <bool> v10, ICollection <sbyte> v11, ICollection <int> v12, ICollection <long> v13, ICollection <float> v14, ICollection <double> v15, IDictionary <long, string> v16, IDictionary <TestBean, bool> v17, IDictionary <Octets, TestBean> v18, TestBean v19) { this.v1 = v1; this.v2 = v2; this.v3 = v3; this.v4 = v4; this.v5 = v5; this.v6 = v6; this.v7 = v7; this.v8 = v8 ?? new Octets(); this.v9 = v9 ?? string.Empty; this.v10 = new List <bool>(10); if (v10 != null) { this.v10.AddRange(v10); } this.v11 = new LinkedList <sbyte>(); if (v11 != null) { Util.AddAll(this.v11, v11); } this.v12 = new LinkedList <int>(); if (v12 != null) { Util.AddAll(this.v12, v12); } this.v13 = new HashSet <long>(); if (v13 != null) { this.v13.UnionWith(v13); } this.v14 = new HashSet <float>(); if (v14 != null) { this.v14.UnionWith(v14); } this.v15 = new HashSet <double>(); if (v15 != null) { this.v15.UnionWith(v15); } this.v16 = new Dictionary <long, string>(0); if (v16 != null) { Util.AddAll(this.v16, v16); } this.v17 = new SortedDictionary <TestBean, bool>(); if (v17 != null) { Util.AddAll(this.v17, v17); } this.v18 = new Dictionary <Octets, TestBean>(); if (v18 != null) { Util.AddAll(this.v18, v18); } this.v19 = TestBean.Create(); }
public void Init() { v8 = new Octets(5); v9 = string.Empty; v10 = new List <bool>(10); v11 = new LinkedList <sbyte>(); v12 = new LinkedList <int>(); v13 = new HashSet <long>(); v14 = new HashSet <float>(); v15 = new HashSet <double>(); v16 = new Dictionary <long, string>(0); v17 = new SortedDictionary <TestBean, bool>(); v18 = new Dictionary <Octets, TestBean>(); v19 = TestBean.Create(); }
public OctetsStream Unmarshal(OctetsStream s) { Init(); for (;;) { int i = s.UnmarshalUInt1(), t = i & 3; if ((i >>= 2) == 63) { i += s.UnmarshalUInt1(); } switch (i) { case 0: return(s); case 1: this.v1 = (s.UnmarshalInt(t) != 0); break; case 2: this.v2 = (sbyte)s.UnmarshalInt(t); break; case 3: this.v3 = (short)s.UnmarshalInt(t); break; case 4: this.v4 = s.UnmarshalInt(t); break; case 5: this.v5 = s.UnmarshalLong(t); break; case 6: this.v6 = s.UnmarshalFloat(t); break; case 7: this.v7 = s.UnmarshalDouble(t); break; case 8: s.Unmarshal(this.v8, t); break; case 9: this.v9 = s.UnmarshalString(t); break; case 10: { this.v10.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; int n = s.UnmarshalUInt(); this.v10.Capacity = (n < 0x10000 ? n : 0x10000); for (; n > 0; --n) { this.v10.Add((s.UnmarshalIntKV(t) != 0)); } } break; case 11: { this.v11.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v11.AddLast((sbyte)s.UnmarshalIntKV(t)); } } break; case 12: { this.v12.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v12.AddLast(s.UnmarshalIntKV(t)); } } break; case 13: { this.v13.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v13.Add(s.UnmarshalLongKV(t)); } } break; case 14: { this.v14.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v14.Add(s.UnmarshalFloatKV(t)); } } break; case 15: { this.v15.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 3) != 0) { s.UnmarshalSkipVarSub(t); break; } t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v15.Add(s.UnmarshalDoubleKV(t)); } } break; case 16: { this.v16.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 6) != 1) { s.UnmarshalSkipVarSub(t); break; } int k = (t >> 3) & 7; t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v16.Add(s.UnmarshalLongKV(k), s.UnmarshalStringKV(t)); } } break; case 17: { this.v17.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 6) != 1) { s.UnmarshalSkipVarSub(t); break; } int k = (t >> 3) & 7; t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v17.Add((TestBean)s.UnmarshalBeanKV(TestBean.Create(), k), (s.UnmarshalIntKV(t) != 0)); } } break; case 18: { this.v18.Clear(); if (t != 3) { s.UnmarshalSkipVar(t); break; } t = s.UnmarshalUInt1(); if ((t >> 6) != 1) { s.UnmarshalSkipVarSub(t); break; } int k = (t >> 3) & 7; t &= 7; for (int n = s.UnmarshalUInt(); n > 0; --n) { this.v18.Add(s.UnmarshalOctetsKV(k), (TestBean)s.UnmarshalBeanKV(TestBean.Create(), t)); } } break; case 19: s.UnmarshalBean(this.v19, t); break; default: s.UnmarshalSkipVar(t); break; } } }
public void Assign(TestType b) { this.v1 = b.v1; this.v2 = b.v2; this.v3 = b.v3; this.v4 = b.v4; this.v5 = b.v5; this.v6 = b.v6; this.v7 = b.v7; if (this.v8 == null) { if (b.v8 != null) { this.v8 = new Octets(b.v8); } } else if (b.v8 != null) { this.v8.Replace(b.v8); } else { this.v8.Clear(); } this.v9 = b.v9 ?? string.Empty; if (this.v10 == null) { this.v10 = new List <bool>(10); } else { this.v10.Clear(); } if (b.v10 != null) { this.v10.AddRange(b.v10); } if (this.v11 == null) { this.v11 = new LinkedList <sbyte>(); } else { this.v11.Clear(); } if (b.v11 != null) { Util.AddAll(this.v11, b.v11); } if (this.v12 == null) { this.v12 = new LinkedList <int>(); } else { this.v12.Clear(); } if (b.v12 != null) { Util.AddAll(this.v12, b.v12); } if (this.v13 == null) { this.v13 = new HashSet <long>(); } else { this.v13.Clear(); } if (b.v13 != null) { this.v13.UnionWith(v13); } if (this.v14 == null) { this.v14 = new HashSet <float>(); } else { this.v14.Clear(); } if (b.v14 != null) { this.v14.UnionWith(v14); } if (this.v15 == null) { this.v15 = new HashSet <double>(); } else { this.v15.Clear(); } if (b.v15 != null) { this.v15.UnionWith(v15); } if (this.v16 == null) { this.v16 = new Dictionary <long, string>(0); } else { this.v16.Clear(); } if (b.v16 != null) { Util.AddAll(this.v16, b.v16); } if (this.v17 == null) { this.v17 = new SortedDictionary <TestBean, bool>(); } else { this.v17.Clear(); } if (b.v17 != null) { Util.AddAll(this.v17, b.v17); } if (this.v18 == null) { this.v18 = new Dictionary <Octets, TestBean>(); } else { this.v18.Clear(); } if (b.v18 != null) { Util.AddAll(this.v18, b.v18); } if (this.v19 == null) { this.v19 = TestBean.Create(); } else { this.v19.Reset(); } if (b.v19 != null) { this.v19.Assign(b.v19); } }