private void SetUnpackedValueOfHistory(MsgPack.Serialization.ComplexTypeWithNonSerialized unpackingContext, System.Collections.Generic.Dictionary<System.DateTime, string> unpackedValue) { System.Collections.Generic.Dictionary<System.DateTime, string> existent = default(System.Collections.Generic.Dictionary<System.DateTime, string>); existent = unpackingContext.History; System.Collections.Generic.Dictionary<System.DateTime, string>.Enumerator enumerator = unpackedValue.GetEnumerator(); System.Collections.Generic.KeyValuePair<System.DateTime, string> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; existent.Add(current.Key, current.Value); } } finally { enumerator.Dispose(); } }
static StackObject *Dispose_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Collections.Generic.Dictionary <System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> .ValueCollection.Enumerator instance_of_this_method = (System.Collections.Generic.Dictionary <System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> .ValueCollection.Enumerator) typeof(System.Collections.Generic.Dictionary <System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance> .ValueCollection.Enumerator).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 16); instance_of_this_method.Dispose(); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); __intp.Free(ptr_of_this_method); return(__ret); }
static StackObject *Dispose_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Collections.Generic.Dictionary <System.String, global::EnemyController> .Enumerator instance_of_this_method = (System.Collections.Generic.Dictionary <System.String, global::EnemyController> .Enumerator) typeof(System.Collections.Generic.Dictionary <System.String, global::EnemyController> .Enumerator).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); instance_of_this_method.Dispose(); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); __intp.Free(ptr_of_this_method); return(__ret); }
protected internal override void PackToCore(MsgPack.Packer packer, System.Collections.Generic.Dictionary <MsgPack.MessagePackObject, MsgPack.MessagePackObject> objectTree) { packer.PackMapHeader(objectTree.Count); System.Collections.Generic.Dictionary <MsgPack.MessagePackObject, MsgPack.MessagePackObject> .Enumerator enumerator = objectTree.GetEnumerator(); System.Collections.Generic.KeyValuePair <MsgPack.MessagePackObject, MsgPack.MessagePackObject> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; this._serializer0.PackTo(packer, current.Key); this._serializer0.PackTo(packer, current.Value); } } finally { enumerator.Dispose(); } }
protected internal override MsgPack.Serialization.ComplexType UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.ComplexType result = default(MsgPack.Serialization.ComplexType); result = new MsgPack.Serialization.ComplexType(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Uri nullable = default(System.Uri); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer1.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { result.Source = nullable; } unpacked = (unpacked + 1); byte[] nullable0 = default(byte[]); if ((unpacked < itemsCount)) { nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexType), "Byte[] Data"); } if (((nullable0 == null) == false)) { result.Data = nullable0; } unpacked = (unpacked + 1); System.Nullable <System.DateTime> nullable1 = default(System.Nullable <System.DateTime>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(2); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer6.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer6.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } } if (nullable1.HasValue) { result.TimeStamp = nullable1.Value; } unpacked = (unpacked + 1); System.Collections.Generic.Dictionary <System.DateTime, string> nullable2 = default(System.Collections.Generic.Dictionary <System.DateTime, string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(3); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable2 = this._serializer4.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker); disposable1 = unpacker.ReadSubtree(); try { nullable2 = this._serializer4.UnpackFrom(disposable1); } finally { if (((disposable1 == null) == false)) { disposable1.Dispose(); } } } } if (((nullable2 == null) == false)) { System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator = nullable2.GetEnumerator(); System.Collections.Generic.KeyValuePair <System.DateTime, string> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.History.Add(current.Key, current.Value); } } finally { enumerator.Dispose(); } } unpacked = (unpacked + 1); System.Collections.Generic.List <int> nullable3 = default(System.Collections.Generic.List <int>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(4); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable3 = this._serializer5.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable3 = this._serializer5.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } } if (((nullable3 == null) == false)) { if ((result.Points == null)) { this._methodBaseComplexType_set_Points0.Invoke(result, new object[] { nullable3 }); } else { System.Collections.Generic.List <int> .Enumerator enumerator0 = nullable3.GetEnumerator(); int current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.Points.Add(current0); } } finally { enumerator0.Dispose(); } } } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable4 = default(string); nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexType), "MemberName"); if (((nullable4 == null) == false)) { key = nullable4; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Points")) { System.Collections.Generic.List <int> nullable9 = default(System.Collections.Generic.List <int>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable9 = this._serializer5.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable6 = default(MsgPack.Unpacker); disposable6 = unpacker.ReadSubtree(); try { nullable9 = this._serializer5.UnpackFrom(disposable6); } finally { if (((disposable6 == null) == false)) { disposable6.Dispose(); } } } if (((nullable9 == null) == false)) { if ((result.Points == null)) { this._methodBaseComplexType_set_Points0.Invoke(result, new object[] { nullable9 }); } else { System.Collections.Generic.List <int> .Enumerator enumerator2 = nullable9.GetEnumerator(); int current2; try { for ( ; enumerator2.MoveNext(); ) { current2 = enumerator2.Current; result.Points.Add(current2); } } finally { enumerator2.Dispose(); } } } } else { if ((key == "History")) { System.Collections.Generic.Dictionary <System.DateTime, string> nullable8 = default(System.Collections.Generic.Dictionary <System.DateTime, string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable8 = this._serializer4.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable5 = default(MsgPack.Unpacker); disposable5 = unpacker.ReadSubtree(); try { nullable8 = this._serializer4.UnpackFrom(disposable5); } finally { if (((disposable5 == null) == false)) { disposable5.Dispose(); } } } if (((nullable8 == null) == false)) { System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator1 = nullable8.GetEnumerator(); System.Collections.Generic.KeyValuePair <System.DateTime, string> current1; try { for ( ; enumerator1.MoveNext(); ) { current1 = enumerator1.Current; result.History.Add(current1.Key, current1.Value); } } finally { enumerator1.Dispose(); } } } else { if ((key == "TimeStamp")) { System.Nullable <System.DateTime> nullable7 = default(System.Nullable <System.DateTime>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable7 = this._serializer6.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable7 = this._serializer6.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (nullable7.HasValue) { result.TimeStamp = nullable7.Value; } } else { if ((key == "Data")) { byte[] nullable6 = default(byte[]); nullable6 = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexType), "Byte[] Data"); if (((nullable6 == null) == false)) { result.Data = nullable6; } } else { if ((key == "Source")) { System.Uri nullable5 = default(System.Uri); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable5 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable5 = this._serializer1.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } if (((nullable5 == null) == false)) { result.Source = nullable5; } } else { unpacker.Skip(); } } } } } } } return(result); }
protected internal override MsgPack.Serialization.ComplexTypeWithNonSerialized UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.ComplexTypeWithNonSerialized result = default(MsgPack.Serialization.ComplexTypeWithNonSerialized); result = new MsgPack.Serialization.ComplexTypeWithNonSerialized(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); byte[] nullable = default(byte[]); if ((unpacked < itemsCount)) { nullable = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithNonSerialized), "Byte[] Data"); } if (((nullable == null) == false)) { result.Data = nullable; } unpacked = (unpacked + 1); System.Collections.Generic.Dictionary <System.DateTime, string> nullable0 = default(System.Collections.Generic.Dictionary <System.DateTime, string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(1); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable0 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable0 = this._serializer2.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable0 == null) == false)) { System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator = nullable0.GetEnumerator(); System.Collections.Generic.KeyValuePair <System.DateTime, string> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; ((System.Collections.Generic.Dictionary <System.DateTime, string>)(this._methodBaseComplexTypeWithNonSerialized_get_History38.Invoke(result, null))).Add(current.Key, current.Value); } } finally { enumerator.Dispose(); } } unpacked = (unpacked + 1); System.Uri nullable1 = default(System.Uri); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(2); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer3.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer3.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } } if (((nullable1 == null) == false)) { result.Source = nullable1; } unpacked = (unpacked + 1); System.Nullable <System.DateTime> nullable2 = default(System.Nullable <System.DateTime>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(3); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable2 = this._serializer5.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker); disposable1 = unpacker.ReadSubtree(); try { nullable2 = this._serializer5.UnpackFrom(disposable1); } finally { if (((disposable1 == null) == false)) { disposable1.Dispose(); } } } } if (nullable2.HasValue) { result.TimeStamp = nullable2.Value; } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable3 = default(string); nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithNonSerialized), "MemberName"); if (((nullable3 == null) == false)) { key = nullable3; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "TimeStamp")) { System.Nullable <System.DateTime> nullable7 = default(System.Nullable <System.DateTime>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable7 = this._serializer5.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable7 = this._serializer5.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (nullable7.HasValue) { result.TimeStamp = nullable7.Value; } } else { if ((key == "Source")) { System.Uri nullable6 = default(System.Uri); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable6 = this._serializer3.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable6 = this._serializer3.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } if (((nullable6 == null) == false)) { result.Source = nullable6; } } else { if ((key == "History")) { System.Collections.Generic.Dictionary <System.DateTime, string> nullable5 = default(System.Collections.Generic.Dictionary <System.DateTime, string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable5 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable5 = this._serializer2.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } if (((nullable5 == null) == false)) { System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator0 = nullable5.GetEnumerator(); System.Collections.Generic.KeyValuePair <System.DateTime, string> current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; ((System.Collections.Generic.Dictionary <System.DateTime, string>)(this._methodBaseComplexTypeWithNonSerialized_get_History38.Invoke(result, null))).Add(current0.Key, current0.Value); } } finally { enumerator0.Dispose(); } } } else { if ((key == "Data")) { byte[] nullable4 = default(byte[]); nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithNonSerialized), "Byte[] Data"); if (((nullable4 == null) == false)) { result.Data = nullable4; } } } } } } } return(result); }