public void RemoveHandler(object o, System.Reflection.MethodInfo method) { //if (!obj) // return; if (obj == null) { return; } System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > .Enumerator enumerator = obj.GetEnumerator(); try { while (enumerator.MoveNext()) { Oranikle.Studio.Controls.WeakDelegate <T> weakDelegate = enumerator.Current; System.WeakReference weakReference = weakDelegate.Obj; object obj1 = weakReference.Target; if ((obj1 == o) && (weakDelegate.Method == method)) { obj.Remove(weakDelegate); return; } } } finally { enumerator.Dispose(); } }
private void SetUnpackedValueOfPoints(MsgPack.Serialization.ComplexType unpackingContext, System.Collections.Generic.List <int> unpackedValue) { System.Collections.Generic.List <int> existent = default(System.Collections.Generic.List <int>); existent = unpackingContext.Points; if ((existent == null)) { this._methodBaseComplexType_set_Points0.Invoke(unpackingContext, new object[] { unpackedValue }); } else { System.Collections.Generic.List <int> .Enumerator enumerator = unpackedValue.GetEnumerator(); int current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; existent.Add(current); } } finally { enumerator.Dispose(); } } }
protected internal override void PackToCore(MsgPack.Packer packer, System.Collections.Generic.List<MsgPack.MessagePackObject[]> objectTree) { packer.PackArrayHeader(objectTree.Count); System.Collections.Generic.List<MsgPack.MessagePackObject[]>.Enumerator enumerator = objectTree.GetEnumerator(); MsgPack.MessagePackObject[] current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; this._serializer0.PackTo(packer, current); } } 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.List <ILRuntime.Runtime.Intepreter.ILTypeInstance> .Enumerator instance_of_this_method = (System.Collections.Generic.List <ILRuntime.Runtime.Intepreter.ILTypeInstance> .Enumerator) typeof(System.Collections.Generic.List <ILRuntime.Runtime.Intepreter.ILTypeInstance> .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); }
private void SetUnpackedValueOfCollectionReadOnlyProperty(MsgPack.Serialization.PlainClass unpackingContext, System.Collections.Generic.List <int> unpackedValue) { System.Collections.Generic.List <int> existent = default(System.Collections.Generic.List <int>); existent = unpackingContext.CollectionReadOnlyProperty; System.Collections.Generic.List <int> .Enumerator enumerator = unpackedValue.GetEnumerator(); int current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; existent.Add(current); } } 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.PlainClass UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PlainClass result = default(MsgPack.Serialization.PlainClass); result = new MsgPack.Serialization.PlainClass(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.List <int> nullable = default(System.Collections.Generic.List <int>); 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)) { System.Collections.Generic.List <int> .Enumerator enumerator = nullable.GetEnumerator(); int current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.CollectionReadOnlyProperty.Add(current); } } finally { enumerator.Dispose(); } } unpacked = (unpacked + 1); System.Nullable <int> nullable0 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PlainClass), "Int32 PublicField"); } if (nullable0.HasValue) { result.PublicField = nullable0.Value; } unpacked = (unpacked + 1); System.Nullable <int> nullable1 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PlainClass), "Int32 PublicProperty"); } if (nullable1.HasValue) { result.PublicProperty = nullable1.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 nullable2 = default(string); nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PlainClass), "MemberName"); if (((nullable2 == null) == false)) { key = nullable2; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "PublicProperty")) { System.Nullable <int> nullable5 = default(System.Nullable <int>); nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PlainClass), "Int32 PublicProperty"); if (nullable5.HasValue) { result.PublicProperty = nullable5.Value; } } else { if ((key == "PublicField")) { System.Nullable <int> nullable4 = default(System.Nullable <int>); nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PlainClass), "Int32 PublicField"); if (nullable4.HasValue) { result.PublicField = nullable4.Value; } } else { if ((key == "CollectionReadOnlyProperty")) { System.Collections.Generic.List <int> nullable3 = default(System.Collections.Generic.List <int>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable3 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable3 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable3 == null) == false)) { System.Collections.Generic.List <int> .Enumerator enumerator0 = nullable3.GetEnumerator(); int current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.CollectionReadOnlyProperty.Add(current0); } } finally { enumerator0.Dispose(); } } } else { unpacker.Skip(); } } } } } return(result); }
protected internal override MsgPack.Serialization.AnnotatedClass UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.AnnotatedClass result = default(MsgPack.Serialization.AnnotatedClass); result = new MsgPack.Serialization.AnnotatedClass(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Nullable <int> nullable = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 PublicProperty"); } if (nullable.HasValue) { result.PublicProperty = nullable.Value; } unpacked = (unpacked + 1); System.Nullable <int> nullable0 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 PublicField"); } if (nullable0.HasValue) { result.PublicField = nullable0.Value; } unpacked = (unpacked + 1); unpacker.Read(); unpacker.Read(); System.Nullable <int> nullable1 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonPublicProperty"); } if (nullable1.HasValue) { this._methodBaseAnnotatedClass_set_NonPublicProperty42.Invoke(result, new object[] { ((object)(nullable1.Value)) }); } unpacked = (unpacked + 1); System.Nullable <int> nullable2 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonPublicField"); } if (nullable2.HasValue) { this._fieldAnnotatedClass_NonPublicField0.SetValue(result, ((object)(nullable2.Value))); } unpacked = (unpacked + 1); System.Nullable <int> nullable3 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonSerializedPublicField"); } if (nullable3.HasValue) { result.NonSerializedPublicField = nullable3.Value; } unpacked = (unpacked + 1); unpacker.Read(); System.Nullable <int> nullable4 = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonSerializedNonPublicField"); } if (nullable4.HasValue) { this._fieldAnnotatedClass_NonSerializedNonPublicField1.SetValue(result, ((object)(nullable4.Value))); } unpacked = (unpacked + 1); System.Collections.Generic.List <int> nullable5 = default(System.Collections.Generic.List <int>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(9); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable5 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable5 = this._serializer2.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable5 == null) == false)) { System.Collections.Generic.List <int> .Enumerator enumerator = nullable5.GetEnumerator(); int current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; ((System.Collections.Generic.List <int>)(this._methodBaseAnnotatedClass_get_CollectionReadOnlyProperty43.Invoke(result, null))).Add(current); } } finally { enumerator.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 nullable6 = default(string); nullable6 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "MemberName"); if (((nullable6 == null) == false)) { key = nullable6; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "CollectionReadOnlyProperty")) { System.Collections.Generic.List <int> nullable13 = default(System.Collections.Generic.List <int>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable13 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable13 = this._serializer2.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable13 == null) == false)) { System.Collections.Generic.List <int> .Enumerator enumerator0 = nullable13.GetEnumerator(); int current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; ((System.Collections.Generic.List <int>)(this._methodBaseAnnotatedClass_get_CollectionReadOnlyProperty43.Invoke(result, null))).Add(current0); } } finally { enumerator0.Dispose(); } } } else { if ((key == "NonSerializedNonPublicField")) { System.Nullable <int> nullable12 = default(System.Nullable <int>); nullable12 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonSerializedNonPublicField"); if (nullable12.HasValue) { this._fieldAnnotatedClass_NonSerializedNonPublicField1.SetValue(result, ((object)(nullable12.Value))); } } else { if ((key == "NonSerializedPublicField")) { System.Nullable <int> nullable11 = default(System.Nullable <int>); nullable11 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonSerializedPublicField"); if (nullable11.HasValue) { result.NonSerializedPublicField = nullable11.Value; } } else { if ((key == "NonPublicField")) { System.Nullable <int> nullable10 = default(System.Nullable <int>); nullable10 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonPublicField"); if (nullable10.HasValue) { this._fieldAnnotatedClass_NonPublicField0.SetValue(result, ((object)(nullable10.Value))); } } else { if ((key == "NonPublicProperty")) { System.Nullable <int> nullable9 = default(System.Nullable <int>); nullable9 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 NonPublicProperty"); if (nullable9.HasValue) { this._methodBaseAnnotatedClass_set_NonPublicProperty42.Invoke(result, new object[] { ((object)(nullable9.Value)) }); } } else { if ((key == "PublicField")) { System.Nullable <int> nullable8 = default(System.Nullable <int>); nullable8 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 PublicField"); if (nullable8.HasValue) { result.PublicField = nullable8.Value; } } else { if ((key == "Alias")) { System.Nullable <int> nullable7 = default(System.Nullable <int>); nullable7 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.AnnotatedClass), "Int32 PublicProperty"); if (nullable7.HasValue) { result.PublicProperty = nullable7.Value; } } else { unpacker.Skip(); } } } } } } } } } return(result); }
public void Invoke(object sender, T e) { //if (!obj) // return; if (obj == null) { return; } lock (obj) { System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > list1 = new System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> >(); System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > .Enumerator enumerator1 = obj.GetEnumerator(); try { while (enumerator1.MoveNext()) { Oranikle.Studio.Controls.WeakDelegate <T> weakDelegate1 = enumerator1.Current; if (!weakDelegate1.IsAlive) { list1.Add(weakDelegate1); } } } finally { enumerator1.Dispose(); } System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > .Enumerator enumerator = list1.GetEnumerator(); try { while (enumerator.MoveNext()) { Oranikle.Studio.Controls.WeakDelegate <T> weakDelegate = enumerator.Current; obj.Remove(weakDelegate); } } finally { enumerator.Dispose(); } System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > list2 = new System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> >(); System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > .Enumerator enumerator2 = obj.GetEnumerator(); try { while (enumerator2.MoveNext()) { Oranikle.Studio.Controls.WeakDelegate <T> weakDelegate3 = enumerator2.Current; list2.Add(weakDelegate3); } } finally { enumerator2.Dispose(); } System.Collections.Generic.List <Oranikle.Studio.Controls.WeakDelegate <T> > .Enumerator enumerator3 = list2.GetEnumerator(); try { while (enumerator3.MoveNext()) { Oranikle.Studio.Controls.WeakDelegate <T> weakDelegate2 = enumerator3.Current; try { weakDelegate2.Invoke(sender, e); } catch (System.Exception e1) { log.Error(e1); } } } finally { enumerator3.Dispose(); } } }
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { System.Drawing.Color color1; System.Drawing.Rectangle rectangle2, rectangle3; try { base.OnPaint(e); } catch (System.NullReferenceException) { //goto label_1; return; } System.Collections.Generic.List <int> .Enumerator enumerator = RowDividerIndex.GetEnumerator(); try { while (enumerator.MoveNext()) { int i1 = enumerator.Current; System.Drawing.Rectangle rectangle1 = GetRowDisplayRectangle(i1, true); if (!rectangle1.IsEmpty) { int i2 = 0; int i3 = Width - 1; int i4 = rectangle1.Bottom; e.Graphics.DrawLine(new System.Drawing.Pen(System.Drawing.Color.DarkGray), new System.Drawing.Point(i2, i4), new System.Drawing.Point(i3, i4)); } } } finally { enumerator.Dispose(); } int i5 = Rows.Count; if (i5 == 0) { if (RowHeadersVisible) { rectangle2 = new System.Drawing.Rectangle(0, ColumnHeadersHeight - RowTemplate.Height, Width, RowTemplate.Height); } else { rectangle2 = new System.Drawing.Rectangle(1, ColumnHeadersHeight - RowTemplate.Height, Width - 1, RowTemplate.Height); } } else { rectangle2 = GetRowDisplayRectangle(i5 - 1, true); } if (rectangle2.IsEmpty) { return; } HeightOfRealAndNewRows = rectangle2.Y + rectangle2.Height; int i6 = rectangle2.Height; rectangle3 = new System.Drawing.Rectangle(); rectangle3.X = rectangle2.X; rectangle3.Y = rectangle2.Y; rectangle3.Width = rectangle2.Width; rectangle3.Height = rectangle2.Height; while (rectangle3.Y < Height) { bool flag = false; rectangle3.X = rectangle2.X; rectangle3.Width = rectangle2.Width; rectangle3.Y += i6; i5++; if (RowHeadersVisible) { System.Drawing.Rectangle rectangle4 = new System.Drawing.Rectangle(rectangle2.X, rectangle3.Y, RowHeadersWidth - 1, i6 - 1); e.Graphics.FillRectangle(new System.Drawing.SolidBrush(RowHeadersDefaultCellStyle.BackColor), rectangle4); e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle4.X, rectangle4.Y, rectangle4.X, rectangle4.Y + rectangle4.Height); e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle4.X, rectangle4.Y + rectangle4.Height, rectangle4.X + rectangle4.Width, rectangle3.Y + rectangle4.Height); e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle4.X + rectangle4.Width, rectangle4.Y, rectangle4.X + rectangle4.Width, rectangle4.Y + rectangle4.Height); flag = true; rectangle3.X += RowHeadersWidth; } if ((i5 % 2) == 0) { color1 = AlternatingRowsDefaultCellStyle.BackColor; } else if (RowsDefaultCellStyle.BackColor != System.Drawing.Color.Empty) { color1 = RowsDefaultCellStyle.BackColor; } else { color1 = DefaultCellStyle.BackColor; } foreach (System.Windows.Forms.DataGridViewColumn dataGridViewColumn in Columns) { if (dataGridViewColumn.Visible) { rectangle3.Width = dataGridViewColumn.Width; e.Graphics.FillRectangle(new System.Drawing.SolidBrush(color1), rectangle3); e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle3.X, rectangle3.Y + i6 - 1, rectangle3.X + Width - 1, rectangle3.Y + i6 - 1); e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle3.X + rectangle3.Width - 1, rectangle3.Y, rectangle3.X + rectangle3.Width - 1, rectangle3.Y + i6 - 1); if (!flag) { e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangle3.X - 1, rectangle3.Y, rectangle3.X - 1, rectangle3.Y + i6 - 1); flag = true; } //if (ShowGridFooter) //{ // System.Drawing.Rectangle rectangleFooter = new System.Drawing.Rectangle(rectangle3.X, Height - rectangle3.Height, rectangle3.Width, i6 - 1); // e.Graphics.DrawLine(new System.Drawing.Pen(GridColor), rectangleFooter.X - 1, rectangleFooter.Y, rectangleFooter.X - 1, rectangleFooter.Y + i6 - 1); // e.Graphics.FillRectangle(new System.Drawing.SolidBrush(AlternatingRowsDefaultCellStyle.BackColor), rectangleFooter); // //Height = Height - rectangle3.Height; // StringFormat format = new StringFormat(); // format.Alignment = TextHelper.TranslateAligment(TextHelper.TranslateGridColumnAligment(dataGridViewColumn.DefaultCellStyle.Alignment)); // format.LineAlignment = TextHelper.TranslateAligment(TextHelper.TranslateGridColumnAligment(DefaultCellStyle.Alignment)); // e.Graphics.DrawString("Output", this.DefaultCellStyle.Font, new System.Drawing.SolidBrush(this.DefaultCellStyle.ForeColor), // rectangleFooter, // format); //} rectangle3.X += dataGridViewColumn.Width; } } } if (ShowGridBorder) { e.Graphics.DrawRectangle(new System.Drawing.Pen(GridColor), 0, 0, Width - 1, Height - 1); } if ((!Enabled || !CustomEnabled) && !CustomActive) { System.Drawing.Color color2 = System.Drawing.SystemColors.Control; System.Drawing.Color color3 = System.Drawing.SystemColors.Control; System.Drawing.Color color4 = System.Drawing.SystemColors.Control; e.Graphics.FillRectangle(new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(140, color2.R, color3.G, color4.B)), new System.Drawing.Rectangle(0, 0, Width, Height)); } }