protected override IO.Ably.InboundMessageTraffic UnpackFromCore(MsgPack.Unpacker unpacker) { IO.Ably.InboundMessageTraffic result = default(IO.Ably.InboundMessageTraffic); result = new IO.Ably.InboundMessageTraffic(); 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(IO.Ably.InboundMessageTraffic), "MemberName"); if (((nullable4 == null) == false)) { key = nullable4; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "rest")) { IO.Ably.MessageTypes nullable9 = default(IO.Ably.MessageTypes); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable9 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable8 = default(MsgPack.Unpacker); disposable8 = unpacker.ReadSubtree(); try { nullable9 = this._serializer1.UnpackFrom(disposable8); } finally { if (((disposable8 == null) == false)) { disposable8.Dispose(); } } } if (((nullable9 == null) == false)) { result.Rest = nullable9; } } else { if ((key == "realtime")) { IO.Ably.MessageTypes nullable8 = default(IO.Ably.MessageTypes); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable8 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable7 = default(MsgPack.Unpacker); disposable7 = unpacker.ReadSubtree(); try { nullable8 = this._serializer1.UnpackFrom(disposable7); } finally { if (((disposable7 == null) == false)) { disposable7.Dispose(); } } } if (((nullable8 == null) == false)) { result.Realtime = nullable8; } } else { if ((key == "all")) { IO.Ably.MessageTypes nullable5 = default(IO.Ably.MessageTypes); 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 disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable5 = this._serializer1.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (((nullable5 == null) == false)) { result.All = nullable5; } } else { unpacker.Skip(); } } } } return(result); }
private void UnpackMemberPlaceHolder(MsgPack.Unpacker unpacker, MsgPack.Serialization.ComplexTypeWithOneBaseOrder unpackingContext, int indexOfItem, int itemsCount) { unpacker.Read(); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string> nullable = default(System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { result.DictPolymorphicKeyAndStaticItem = nullable; } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "DictPolymorphicKeyAndStaticItem")) { System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string> nullable1 = default(System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { result.DictPolymorphicKeyAndStaticItem = nullable1; } } else { unpacker.Skip(); } } } return(result); }
protected override IO.Ably.TokenRequest UnpackFromCore(MsgPack.Unpacker unpacker) { IO.Ably.TokenRequest result = default(IO.Ably.TokenRequest); result = new IO.Ably.TokenRequest(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); IO.Ably.Capability nullable = default(IO.Ably.Capability); 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.Capability = nullable; } unpacked = (unpacked + 1); string nullable0 = default(string); if ((unpacked < itemsCount)) { nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String ClientId"); } if (((nullable0 == null) == false)) { result.ClientId = nullable0; } unpacked = (unpacked + 1); string nullable1 = default(string); if ((unpacked < itemsCount)) { nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String KeyName"); } if (((nullable1 == null) == false)) { result.KeyName = nullable1; } unpacked = (unpacked + 1); string nullable2 = default(string); if ((unpacked < itemsCount)) { nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String Mac"); } if (((nullable2 == null) == false)) { result.Mac = nullable2; } unpacked = (unpacked + 1); string nullable3 = default(string); if ((unpacked < itemsCount)) { nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String Nonce"); } if (((nullable3 == null) == false)) { result.Nonce = nullable3; } unpacked = (unpacked + 1); System.Nullable <System.DateTimeOffset> nullable4 = default(System.Nullable <System.DateTimeOffset>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(5); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable4 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable4 = this._serializer2.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } } if (nullable4.HasValue) { result.Timestamp = nullable4; } unpacked = (unpacked + 1); System.Nullable <System.TimeSpan> nullable5 = default(System.Nullable <System.TimeSpan>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(6); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable5 = this._serializer3.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker); disposable1 = unpacker.ReadSubtree(); try { nullable5 = this._serializer3.UnpackFrom(disposable1); } finally { if (((disposable1 == null) == false)) { disposable1.Dispose(); } } } } if (nullable5.HasValue) { result.Ttl = nullable5; } 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(IO.Ably.TokenRequest), "MemberName"); if (((nullable6 == null) == false)) { key = nullable6; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Ttl")) { System.Nullable <System.TimeSpan> nullable13 = default(System.Nullable <System.TimeSpan>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable13 = this._serializer3.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable13 = this._serializer3.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (nullable13.HasValue) { result.Ttl = nullable13; } } else { if ((key == "Timestamp")) { System.Nullable <System.DateTimeOffset> nullable12 = default(System.Nullable <System.DateTimeOffset>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable12 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable12 = this._serializer2.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } if (nullable12.HasValue) { result.Timestamp = nullable12; } } else { if ((key == "Nonce")) { string nullable11 = default(string); nullable11 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String Nonce"); if (((nullable11 == null) == false)) { result.Nonce = nullable11; } } else { if ((key == "Mac")) { string nullable10 = default(string); nullable10 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String Mac"); if (((nullable10 == null) == false)) { result.Mac = nullable10; } } else { if ((key == "KeyName")) { string nullable9 = default(string); nullable9 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String KeyName"); if (((nullable9 == null) == false)) { result.KeyName = nullable9; } } else { if ((key == "ClientId")) { string nullable8 = default(string); nullable8 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.TokenRequest), "System.String ClientId"); if (((nullable8 == null) == false)) { result.ClientId = nullable8; } } else { if ((key == "Capability")) { IO.Ably.Capability nullable7 = default(IO.Ably.Capability); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable7 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable7 = this._serializer1.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } if (((nullable7 == null) == false)) { result.Capability = nullable7; } } else { unpacker.Skip(); } } } } } } } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Nullable <System.DateTime> nullable = default(System.Nullable <System.DateTime>); 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.HasValue) { result.Value = nullable.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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Value")) { System.Nullable <System.DateTime> nullable1 = default(System.Nullable <System.DateTime>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (nullable1.HasValue) { result.Value = nullable1.Value; } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IDictionary <string, MsgPack.Serialization.FileSystemEntry> nullable = default(System.Collections.Generic.IDictionary <string, MsgPack.Serialization.FileSystemEntry>); 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)) { if ((result.DictStaticKeyAndPolymorphicItem == null)) { this._methodBasePolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_set_DictStaticKeyAndPolymorphicItem0.Invoke(result, new object[] { nullable }); } else { System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <string, MsgPack.Serialization.FileSystemEntry> > enumerator = nullable.GetEnumerator(); System.Collections.Generic.KeyValuePair <string, MsgPack.Serialization.FileSystemEntry> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.DictStaticKeyAndPolymorphicItem.Add(current.Key, current.Value); } } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "DictStaticKeyAndPolymorphicItem")) { System.Collections.Generic.IDictionary <string, MsgPack.Serialization.FileSystemEntry> nullable1 = default(System.Collections.Generic.IDictionary <string, MsgPack.Serialization.FileSystemEntry>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { if ((result.DictStaticKeyAndPolymorphicItem == null)) { this._methodBasePolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_set_DictStaticKeyAndPolymorphicItem0.Invoke(result, new object[] { nullable1 }); } else { System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <string, MsgPack.Serialization.FileSystemEntry> > enumerator0 = nullable1.GetEnumerator(); System.Collections.Generic.KeyValuePair <string, MsgPack.Serialization.FileSystemEntry> current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.DictStaticKeyAndPolymorphicItem.Add(current0.Key, current0.Value); } } finally { enumerator0.Dispose(); } } } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.ComplexTypeGeneratedEnclosure UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.ComplexTypeGeneratedEnclosure result = default(MsgPack.Serialization.ComplexTypeGeneratedEnclosure); result = new MsgPack.Serialization.ComplexTypeGeneratedEnclosure(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); string nullable = default(string); if ((unpacked < itemsCount)) { nullable = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeGeneratedEnclosure), "System.String Name"); } if (((nullable == null) == false)) { result.Name = nullable; } unpacked = (unpacked + 1); MsgPack.Serialization.ComplexTypeGenerated nullable0 = default(MsgPack.Serialization.ComplexTypeGenerated); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(1); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable0 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable0 = this._serializer1.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable0 == null) == false)) { result.Nested = nullable0; } 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 nullable1 = default(string); nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeGeneratedEnclosure), "MemberName"); if (((nullable1 == null) == false)) { key = nullable1; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Nested")) { MsgPack.Serialization.ComplexTypeGenerated nullable3 = default(MsgPack.Serialization.ComplexTypeGenerated); 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)) { result.Nested = nullable3; } } else { if ((key == "Name")) { string nullable2 = default(string); nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeGeneratedEnclosure), "System.String Name"); if (((nullable2 == null) == false)) { result.Name = nullable2; } } else { unpacker.Skip(); } } } } return(result); }
protected internal override MsgPack.Serialization.InterfaceCollectionNoAttribute UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.InterfaceCollectionNoAttribute result = default(MsgPack.Serialization.InterfaceCollectionNoAttribute); result = new MsgPack.Serialization.InterfaceCollectionNoAttribute(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IList <string> nullable = default(System.Collections.Generic.IList <string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { result.Value = nullable; } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.InterfaceCollectionNoAttribute), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Value")) { System.Collections.Generic.IList <string> nullable1 = default(System.Collections.Generic.IList <string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { result.Value = nullable1; } } 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_NonPublicProperty1.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; result.CollectionReadOnlyProperty.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; result.CollectionReadOnlyProperty.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_NonPublicProperty1.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); }
protected override IO.Ably.ConnectionDetails UnpackFromCore(MsgPack.Unpacker unpacker) { IO.Ably.ConnectionDetails result = default(IO.Ably.ConnectionDetails); result = new IO.Ably.ConnectionDetails(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); string nullable = default(string); if ((unpacked < itemsCount)) { nullable = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String clientId"); } if (((nullable == null) == false)) { result.ClientId = nullable; } unpacked = (unpacked + 1); string nullable0 = default(string); if ((unpacked < itemsCount)) { nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String connectionKey"); } if (((nullable0 == null) == false)) { result.ConnectionKey = nullable0; } unpacked = (unpacked + 1); System.Nullable <System.TimeSpan> nullable1 = default(System.Nullable <System.TimeSpan>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(2); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (nullable1.HasValue) { result.ConnectionStateTtl = nullable1; } unpacked = (unpacked + 1); System.Nullable <long> nullable2 = default(System.Nullable <long>); if ((unpacked < itemsCount)) { nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxFrameSize"); } if (nullable2.HasValue) { result.MaxFrameSize = nullable2.Value; } unpacked = (unpacked + 1); System.Nullable <long> nullable3 = default(System.Nullable <long>); if ((unpacked < itemsCount)) { nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxInboundRate"); } if (nullable3.HasValue) { result.MaxInboundRate = nullable3.Value; } unpacked = (unpacked + 1); System.Nullable <long> nullable4 = default(System.Nullable <long>); if ((unpacked < itemsCount)) { nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxMessageSize"); } if (nullable4.HasValue) { result.MaxMessageSize = nullable4.Value; } unpacked = (unpacked + 1); string nullable5 = default(string); if ((unpacked < itemsCount)) { nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String serverId"); } if (((nullable5 == null) == false)) { result.ServerId = nullable5; } 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(IO.Ably.ConnectionDetails), "MemberName"); if (((nullable6 == null) == false)) { key = nullable6; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "serverId")) { string nullable13 = default(string); nullable13 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String serverId"); if (((nullable13 == null) == false)) { result.ServerId = nullable13; } } else { if ((key == "maxMessageSize")) { System.Nullable <long> nullable12 = default(System.Nullable <long>); nullable12 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxMessageSize"); if (nullable12.HasValue) { result.MaxMessageSize = nullable12.Value; } } else { if ((key == "maxInboundRate")) { System.Nullable <long> nullable11 = default(System.Nullable <long>); nullable11 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxInboundRate"); if (nullable11.HasValue) { result.MaxInboundRate = nullable11.Value; } } else { if ((key == "maxFrameSize")) { System.Nullable <long> nullable10 = default(System.Nullable <long>); nullable10 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.ConnectionDetails), "Int64 maxFrameSize"); if (nullable10.HasValue) { result.MaxFrameSize = nullable10.Value; } } else { if ((key == "connectionStateTtl")) { System.Nullable <System.TimeSpan> nullable9 = default(System.Nullable <System.TimeSpan>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable9 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable9 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (nullable9.HasValue) { result.ConnectionStateTtl = nullable9; } } else { if ((key == "connectionKey")) { string nullable8 = default(string); nullable8 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String connectionKey"); if (((nullable8 == null) == false)) { result.ConnectionKey = nullable8; } } else { if ((key == "clientId")) { string nullable7 = default(string); nullable7 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.ConnectionDetails), "System.String clientId"); if (((nullable7 == null) == false)) { result.ClientId = nullable7; } } else { unpacker.Skip(); } } } } } } } } } return(result); }
protected internal override MsgPack.Serialization.EnumMemberObject UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.EnumMemberObject result = default(MsgPack.Serialization.EnumMemberObject); result = new MsgPack.Serialization.EnumMemberObject(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Nullable <MsgPack.Serialization.EnumByName> nullable = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer9.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer9.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (nullable.HasValue) { result.ByNameByNameProperty = nullable.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumByName> nullable0 = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(1); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable0 = this._serializer10.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable0 = this._serializer10.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } } if (nullable0.HasValue) { result.ByNameByUnderlyingValueProperty = nullable0.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumByName> nullable1 = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(2); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer11.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker); disposable1 = unpacker.ReadSubtree(); try { nullable1 = this._serializer11.UnpackFrom(disposable1); } finally { if (((disposable1 == null) == false)) { disposable1.Dispose(); } } } } if (nullable1.HasValue) { result.ByNameDefaultProperty = nullable1.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable2 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(3); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable2 = this._serializer12.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable2 = this._serializer12.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } } if (nullable2.HasValue) { result.ByUnderlyingValueByNameProperty = nullable2.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable3 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(4); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable3 = this._serializer13.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable3 = this._serializer13.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } } if (nullable3.HasValue) { result.ByUnderlyingValueByUnderlyingValueProperty = nullable3.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable4 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(5); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable4 = this._serializer14.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable4 = this._serializer14.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } } if (nullable4.HasValue) { result.ByUnderlyingValueDefaultProperty = nullable4.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumDefault> nullable5 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(6); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable5 = this._serializer15.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable5 = default(MsgPack.Unpacker); disposable5 = unpacker.ReadSubtree(); try { nullable5 = this._serializer15.UnpackFrom(disposable5); } finally { if (((disposable5 == null) == false)) { disposable5.Dispose(); } } } } if (nullable5.HasValue) { result.DefaultByNameProperty = nullable5.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumDefault> nullable6 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(7); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable6 = this._serializer16.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable6 = default(MsgPack.Unpacker); disposable6 = unpacker.ReadSubtree(); try { nullable6 = this._serializer16.UnpackFrom(disposable6); } finally { if (((disposable6 == null) == false)) { disposable6.Dispose(); } } } } if (nullable6.HasValue) { result.DefaultByUnderlyingValueProperty = nullable6.Value; } unpacked = (unpacked + 1); System.Nullable <MsgPack.Serialization.EnumDefault> nullable7 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(8); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable7 = this._serializer17.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable7 = default(MsgPack.Unpacker); disposable7 = unpacker.ReadSubtree(); try { nullable7 = this._serializer17.UnpackFrom(disposable7); } finally { if (((disposable7 == null) == false)) { disposable7.Dispose(); } } } } if (nullable7.HasValue) { result.DefaultDefaultProperty = nullable7.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 nullable8 = default(string); nullable8 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.EnumMemberObject), "MemberName"); if (((nullable8 == null) == false)) { key = nullable8; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "DefaultDefaultProperty")) { System.Nullable <MsgPack.Serialization.EnumDefault> nullable17 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable17 = this._serializer17.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable16 = default(MsgPack.Unpacker); disposable16 = unpacker.ReadSubtree(); try { nullable17 = this._serializer17.UnpackFrom(disposable16); } finally { if (((disposable16 == null) == false)) { disposable16.Dispose(); } } } if (nullable17.HasValue) { result.DefaultDefaultProperty = nullable17.Value; } } else { if ((key == "DefaultByUnderlyingValueProperty")) { System.Nullable <MsgPack.Serialization.EnumDefault> nullable16 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable16 = this._serializer16.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable15 = default(MsgPack.Unpacker); disposable15 = unpacker.ReadSubtree(); try { nullable16 = this._serializer16.UnpackFrom(disposable15); } finally { if (((disposable15 == null) == false)) { disposable15.Dispose(); } } } if (nullable16.HasValue) { result.DefaultByUnderlyingValueProperty = nullable16.Value; } } else { if ((key == "DefaultByNameProperty")) { System.Nullable <MsgPack.Serialization.EnumDefault> nullable15 = default(System.Nullable <MsgPack.Serialization.EnumDefault>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable15 = this._serializer15.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable14 = default(MsgPack.Unpacker); disposable14 = unpacker.ReadSubtree(); try { nullable15 = this._serializer15.UnpackFrom(disposable14); } finally { if (((disposable14 == null) == false)) { disposable14.Dispose(); } } } if (nullable15.HasValue) { result.DefaultByNameProperty = nullable15.Value; } } else { if ((key == "ByUnderlyingValueDefaultProperty")) { System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable14 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable14 = this._serializer14.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable13 = default(MsgPack.Unpacker); disposable13 = unpacker.ReadSubtree(); try { nullable14 = this._serializer14.UnpackFrom(disposable13); } finally { if (((disposable13 == null) == false)) { disposable13.Dispose(); } } } if (nullable14.HasValue) { result.ByUnderlyingValueDefaultProperty = nullable14.Value; } } else { if ((key == "ByUnderlyingValueByUnderlyingValueProperty")) { System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable13 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable13 = this._serializer13.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable12 = default(MsgPack.Unpacker); disposable12 = unpacker.ReadSubtree(); try { nullable13 = this._serializer13.UnpackFrom(disposable12); } finally { if (((disposable12 == null) == false)) { disposable12.Dispose(); } } } if (nullable13.HasValue) { result.ByUnderlyingValueByUnderlyingValueProperty = nullable13.Value; } } else { if ((key == "ByUnderlyingValueByNameProperty")) { System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue> nullable12 = default(System.Nullable <MsgPack.Serialization.EnumByUnderlyingValue>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable12 = this._serializer12.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable11 = default(MsgPack.Unpacker); disposable11 = unpacker.ReadSubtree(); try { nullable12 = this._serializer12.UnpackFrom(disposable11); } finally { if (((disposable11 == null) == false)) { disposable11.Dispose(); } } } if (nullable12.HasValue) { result.ByUnderlyingValueByNameProperty = nullable12.Value; } } else { if ((key == "ByNameDefaultProperty")) { System.Nullable <MsgPack.Serialization.EnumByName> nullable11 = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable11 = this._serializer11.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable10 = default(MsgPack.Unpacker); disposable10 = unpacker.ReadSubtree(); try { nullable11 = this._serializer11.UnpackFrom(disposable10); } finally { if (((disposable10 == null) == false)) { disposable10.Dispose(); } } } if (nullable11.HasValue) { result.ByNameDefaultProperty = nullable11.Value; } } else { if ((key == "ByNameByUnderlyingValueProperty")) { System.Nullable <MsgPack.Serialization.EnumByName> nullable10 = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable10 = this._serializer10.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable9 = default(MsgPack.Unpacker); disposable9 = unpacker.ReadSubtree(); try { nullable10 = this._serializer10.UnpackFrom(disposable9); } finally { if (((disposable9 == null) == false)) { disposable9.Dispose(); } } } if (nullable10.HasValue) { result.ByNameByUnderlyingValueProperty = nullable10.Value; } } else { if ((key == "ByNameByNameProperty")) { System.Nullable <MsgPack.Serialization.EnumByName> nullable9 = default(System.Nullable <MsgPack.Serialization.EnumByName>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable9 = this._serializer9.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable8 = default(MsgPack.Unpacker); disposable8 = unpacker.ReadSubtree(); try { nullable9 = this._serializer9.UnpackFrom(disposable8); } finally { if (((disposable8 == null) == false)) { disposable8.Dispose(); } } } if (nullable9.HasValue) { result.ByNameByNameProperty = nullable9.Value; } } 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; ((System.Collections.Generic.List <int>)(this._methodBasePlainClass_get_CollectionReadOnlyProperty40.Invoke(result, null))).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; ((System.Collections.Generic.List <int>)(this._methodBasePlainClass_get_CollectionReadOnlyProperty40.Invoke(result, null))).Add(current0); } } finally { enumerator0.Dispose(); } } } else { unpacker.Skip(); } } } } } return(result); }
protected internal override void UnpackToCore(MsgPack.Unpacker unpacker, System.Collections.Generic.Dictionary <MsgPack.MessagePackObject, MsgPack.MessagePackObject> collection) { if ((unpacker.IsMapHeader == false)) { throw MsgPack.Serialization.SerializationExceptions.NewIsNotMapHeader(); } int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount); i = (i + 1)) { MsgPack.MessagePackObject key = default(MsgPack.MessagePackObject); MsgPack.MessagePackObject value = default(MsgPack.MessagePackObject); MsgPack.MessagePackObject nullable = default(MsgPack.MessagePackObject); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = unpacker.LastReadData; } else { nullable = unpacker.UnpackSubtreeData(); } if ((nullable.IsNil == false)) { key = nullable; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited(string.Format(System.Globalization.CultureInfo.InvariantCulture, "key{0}", new object[] { ((object)(i)) })); } MsgPack.MessagePackObject nullable0 = default(MsgPack.MessagePackObject); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable0 = unpacker.LastReadData; } else { nullable0 = unpacker.UnpackSubtreeData(); } if ((nullable0.IsNil == false)) { value = nullable0; } else { value = nullable0; } collection.Add(key, value); } }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IList <string> nullable = default(System.Collections.Generic.IList <string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { System.Collections.Generic.IEnumerator <string> enumerator = nullable.GetEnumerator(); string current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.ListPolymorphicItself.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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "ListPolymorphicItself")) { System.Collections.Generic.IList <string> nullable1 = default(System.Collections.Generic.IList <string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { System.Collections.Generic.IEnumerator <string> enumerator0 = nullable1.GetEnumerator(); string current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.ListPolymorphicItself.Add(current0); } } finally { enumerator0.Dispose(); } } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.TestValueType UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.TestValueType result = default(MsgPack.Serialization.TestValueType); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.Dictionary <int, int> nullable = default(System.Collections.Generic.Dictionary <int, 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)) { result.DictionaryField = nullable; } unpacked = (unpacked + 1); int[] nullable0 = default(int[]); 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 disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable0 = this._serializer2.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } } if (((nullable0 == null) == false)) { result.Int32ArrayField = nullable0; } unpacked = (unpacked + 1); string nullable1 = default(string); if ((unpacked < itemsCount)) { nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.TestValueType), "System.String StringField"); } if (((nullable1 == null) == false)) { result.StringField = nullable1; } 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.TestValueType), "MemberName"); if (((nullable2 == null) == false)) { key = nullable2; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "StringField")) { string nullable5 = default(string); nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.TestValueType), "System.String StringField"); if (((nullable5 == null) == false)) { result.StringField = nullable5; } } else { if ((key == "Int32ArrayField")) { int[] nullable4 = default(int[]); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable4 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable4 = this._serializer2.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } if (((nullable4 == null) == false)) { result.Int32ArrayField = nullable4; } } else { if ((key == "DictionaryField")) { System.Collections.Generic.Dictionary <int, int> nullable3 = default(System.Collections.Generic.Dictionary <int, 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 disposable1 = default(MsgPack.Unpacker); disposable1 = unpacker.ReadSubtree(); try { nullable3 = this._serializer1.UnpackFrom(disposable1); } finally { if (((disposable1 == null) == false)) { disposable1.Dispose(); } } } if (((nullable3 == null) == false)) { result.DictionaryField = nullable3; } } } } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Tuple <MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, System.Tuple <MsgPack.Serialization.FileSystemEntry> > nullable = default(System.Tuple <MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, System.Tuple <MsgPack.Serialization.FileSystemEntry> >); 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)) { this._methodBasePolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_set_Tuple8AllPolymorphic0.Invoke(result, new object[] { nullable }); } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Tuple8AllPolymorphic")) { System.Tuple <MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, System.Tuple <MsgPack.Serialization.FileSystemEntry> > nullable1 = default(System.Tuple <MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, MsgPack.Serialization.FileSystemEntry, System.Tuple <MsgPack.Serialization.FileSystemEntry> >); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { this._methodBasePolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_set_Tuple8AllPolymorphic0.Invoke(result, new object[] { nullable1 }); } } else { unpacker.Skip(); } } } return(result); }
protected override IO.Ably.MessageTypes UnpackFromCore(MsgPack.Unpacker unpacker) { IO.Ably.MessageTypes result = default(IO.Ably.MessageTypes); result = new IO.Ably.MessageTypes(); 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(IO.Ably.MessageTypes), "MemberName"); if (((nullable2 == null) == false)) { key = nullable2; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "presence")) { IO.Ably.MessageCount nullable5 = default(IO.Ably.MessageCount); 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 disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable5 = this._serializer1.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (((nullable5 == null) == false)) { result.Presence = nullable5; } } else { if ((key == "messages")) { IO.Ably.MessageCount nullable4 = default(IO.Ably.MessageCount); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable4 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable4 = this._serializer1.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } if (((nullable4 == null) == false)) { result.Messages = nullable4; } } else { if ((key == "all")) { IO.Ably.MessageCount nullable3 = default(IO.Ably.MessageCount); 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 disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable3 = this._serializer1.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } if (((nullable3 == null) == false)) { result.All = nullable3; } } else { unpacker.Skip(); } } } } return(result); }
protected override IO.Ably.Types.ProtocolMessage UnpackFromCore(MsgPack.Unpacker unpacker) { IO.Ably.Types.ProtocolMessage result = default(IO.Ably.Types.ProtocolMessage); result = new IO.Ably.Types.ProtocolMessage(); int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable14 = default(string); nullable14 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.Types.ProtocolMessage), "MemberName"); if (((nullable14 == null) == false)) { key = nullable14; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "timestamp")) { System.Nullable <System.DateTimeOffset> nullable29 = default(System.Nullable <System.DateTimeOffset>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable29 = this._serializer10.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable12 = default(MsgPack.Unpacker); disposable12 = unpacker.ReadSubtree(); try { nullable29 = this._serializer10.UnpackFrom(disposable12); } finally { if (((disposable12 == null) == false)) { disposable12.Dispose(); } } } if (nullable29.HasValue) { result.Timestamp = nullable29; } } else { if ((key == "presence")) { IO.Ably.PresenceMessage[] nullable28 = default(IO.Ably.PresenceMessage[]); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable28 = this._serializer9.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable11 = default(MsgPack.Unpacker); disposable11 = unpacker.ReadSubtree(); try { nullable28 = this._serializer9.UnpackFrom(disposable11); } finally { if (((disposable11 == null) == false)) { disposable11.Dispose(); } } } if (((nullable28 == null) == false)) { result.Presence = nullable28; } } else { if ((key == "msgSerial")) { System.Nullable <long> nullable27 = default(System.Nullable <long>); nullable27 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value(unpacker, typeof(IO.Ably.Types.ProtocolMessage), "Int64 msgSerial"); if (nullable27.HasValue) { result.MsgSerial = nullable27.Value; } } else { if ((key == "messages")) { IO.Ably.Message[] nullable26 = default(IO.Ably.Message[]); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable26 = this._serializer7.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable10 = default(MsgPack.Unpacker); disposable10 = unpacker.ReadSubtree(); try { nullable26 = this._serializer7.UnpackFrom(disposable10); } finally { if (((disposable10 == null) == false)) { disposable10.Dispose(); } } } if (((nullable26 == null) == false)) { result.Messages = nullable26; } } else { if ((key == "id")) { string nullable25 = default(string); nullable25 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.String id"); if (((nullable25 == null) == false)) { result.Id = nullable25; } } else { if ((key == "flags")) { System.Nullable <int> nullable24 = default(System.Nullable <int>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable24 = this._serializer6.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable9 = default(MsgPack.Unpacker); disposable9 = unpacker.ReadSubtree(); try { nullable24 = this._serializer6.UnpackFrom(disposable9); } finally { if (((disposable9 == null) == false)) { disposable9.Dispose(); } } } if (nullable24.HasValue) { result.Flags = nullable24; } } else { if ((key == "error")) { IO.Ably.ErrorInfo nullable23 = default(IO.Ably.ErrorInfo); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable23 = this._serializer5.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable8 = default(MsgPack.Unpacker); disposable8 = unpacker.ReadSubtree(); try { nullable23 = this._serializer5.UnpackFrom(disposable8); } finally { if (((disposable8 == null) == false)) { disposable8.Dispose(); } } } if (((nullable23 == null) == false)) { result.Error = nullable23; } } else { if ((key == "count")) { System.Nullable <int> nullable22 = default(System.Nullable <int>); nullable22 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value( unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.Nullable`1[System.Int32] count"); if (nullable22.HasValue) { result.Count = nullable22; } } else { if ((key == "connectionSerial")) { System.Nullable <long> nullable21 = default(System.Nullable <long>); nullable21 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt64Value( unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.Nullable`1[System.Int64] connectionSerial"); if (nullable21.HasValue) { result.ConnectionSerial = nullable21; } } else { if ((key == "connectionKey")) { string nullable20 = default(string); nullable20 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue( unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.String connectionKey"); if (((nullable20 == null) == false)) { result.ConnectionKey = nullable20; } } else { if ((key == "connectionId")) { string nullable19 = default(string); nullable19 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue( unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.String connectionId"); if (((nullable19 == null) == false)) { result.ConnectionId = nullable19; } } else { if ((key == "connectionDetails")) { IO.Ably.ConnectionDetails nullable18 = default(IO.Ably.ConnectionDetails); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions .NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable18 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable7 = default(MsgPack.Unpacker); disposable7 = unpacker.ReadSubtree(); try { nullable18 = this._serializer2.UnpackFrom(disposable7); } finally { if (((disposable7 == null) == false)) { disposable7.Dispose(); } } } if (((nullable18 == null) == false)) { result.ConnectionDetails = nullable18; } } else { if ((key == "channelSerial")) { string nullable17 = default(string); nullable17 = MsgPack.Serialization.UnpackHelpers .UnpackStringValue(unpacker, typeof(IO.Ably.Types.ProtocolMessage), "System.String channelSerial"); if (((nullable17 == null) == false)) { result.ChannelSerial = nullable17; } } else { if ((key == "channel")) { string nullable16 = default(string); nullable16 = MsgPack.Serialization.UnpackHelpers .UnpackStringValue(unpacker, typeof(IO.Ably.Types.ProtocolMessage ), "System.String channel"); if (((nullable16 == null) == false)) { result.Channel = nullable16; } } else { if ((key == "action")) { System.Nullable < IO.Ably.Types.ProtocolMessage. MessageAction> nullable15 = default( System.Nullable < IO.Ably.Types. ProtocolMessage . MessageAction >); if ((unpacker.Read() == false)) { throw MsgPack.Serialization .SerializationExceptions .NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable15 = this._serializer11.UnpackFrom( unpacker); } else { MsgPack.Unpacker disposable6 = default(MsgPack.Unpacker); disposable6 = unpacker.ReadSubtree(); try { nullable15 = this._serializer11.UnpackFrom( disposable6); } finally { if (((disposable6 == null) == false)) { disposable6.Dispose(); } } } if (nullable15.HasValue) { result.Action = nullable15.Value; } } else { unpacker.Skip(); } } } } } } } } } } } } } } } } return(result); }
protected internal override MsgPack.Serialization.ComplexTypeWithOneBaseOrder UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.ComplexTypeWithOneBaseOrder result = default(MsgPack.Serialization.ComplexTypeWithOneBaseOrder); result = new MsgPack.Serialization.ComplexTypeWithOneBaseOrder(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); unpacker.Read(); System.Nullable <int> nullable = default(System.Nullable <int>); if ((unpacked < itemsCount)) { nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithOneBaseOrder), "Int32 One"); } if (nullable.HasValue) { result.One = 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.ComplexTypeWithOneBaseOrder), "Int32 Two"); } if (nullable0.HasValue) { result.Two = nullable0.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 nullable1 = default(string); nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithOneBaseOrder), "MemberName"); if (((nullable1 == null) == false)) { key = nullable1; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Two")) { System.Nullable <int> nullable3 = default(System.Nullable <int>); nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithOneBaseOrder), "Int32 Two"); if (nullable3.HasValue) { result.Two = nullable3.Value; } } else { if ((key == "One")) { System.Nullable <int> nullable2 = default(System.Nullable <int>); nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithOneBaseOrder), "Int32 One"); if (nullable2.HasValue) { result.One = nullable2.Value; } } 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._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable0 = this._serializer1.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; result.History.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._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer2.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._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.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._serializer4.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable7 = this._serializer4.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._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable6 = this._serializer2.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._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable5 = this._serializer1.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; result.History.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; } } else { unpacker.Skip(); } } } } } } return(result); }
protected internal override void UnpackToCore(MsgPack.Unpacker unpacker, System.Collections.Generic.Dictionary <object, object> collection) { if ((unpacker.IsMapHeader == false)) { throw MsgPack.Serialization.SerializationExceptions.NewIsNotMapHeader(); } int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount); i = (i + 1)) { object key = default(object); object value = default(object); object nullable = default(object); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } if (((nullable == null) == false)) { key = nullable; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited(string.Format(System.Globalization.CultureInfo.InvariantCulture, "key{0}", new object[] { ((object)(i)) })); } object nullable0 = default(object); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable0 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable0 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable0 == null) == false)) { value = nullable0; } else { value = nullable0; } collection.Add(key, value); } }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); object nullable = default(object); 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)) { this._methodBasePolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_set_DictObjectItself0.Invoke(result, new object[] { nullable }); } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "DictObjectItself")) { object nullable1 = default(object); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { this._methodBasePolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_set_DictObjectItself0.Invoke(result, new object[] { nullable1 }); } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); object nullable = default(object); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { result.Reference = nullable; } 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 nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Reference")) { object nullable1 = default(object); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { result.Reference = nullable1; } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Tuple <string, string, string, string, string, string, string> ctorArg0 = default(System.Tuple <string, string, string, string, string, string, string>); ctorArg0 = null; System.Tuple <string, string, string, string, string, string, string> nullable = default(System.Tuple <string, string, string, string, string, string, string>); 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)) { ctorArg0 = nullable; } unpacked = (unpacked + 1); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor(ctorArg0); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Tuple <string, string, string, string, string, string, string> ctorArg00 = default(System.Tuple <string, string, string, string, string, string, string>); ctorArg00 = null; for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Tuple7AllStatic")) { System.Tuple <string, string, string, string, string, string, string> nullable1 = default(System.Tuple <string, string, string, string, string, string, string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { ctorArg00 = nullable1; } } else { unpacker.Skip(); } } result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor(ctorArg00); } return(result); }
protected override TokenDetails UnpackFromCore(MsgPack.Unpacker unpacker) { TokenDetails result = default(TokenDetails); result = new TokenDetails(); { 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(TokenDetails), "MemberName"); if (((nullable4 == null) == false)) { key = nullable4; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "clientId")) { string nullable9 = default(string); nullable9 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(TokenDetails), "System.String ClientId"); if (((nullable9 == null) == false)) { result.ClientId = nullable9; } } else { if ((key == "keyName")) { string keyNameValue = null; if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { keyNameValue = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable10 = default(MsgPack.Unpacker); disposable10 = unpacker.ReadSubtree(); try { keyNameValue = this._serializer0.UnpackFrom(disposable10); } finally { if (((disposable10 == null) == false)) { disposable10.Dispose(); } } } if (((keyNameValue == null) == false)) { result.KeyName = keyNameValue; } } else if ((key == "capability")) { IO.Ably.Capability nullable8 = default(IO.Ably.Capability); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable8 = this._serializer2.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable4 = default(MsgPack.Unpacker); disposable4 = unpacker.ReadSubtree(); try { nullable8 = this._serializer2.UnpackFrom(disposable4); } finally { if (((disposable4 == null) == false)) { disposable4.Dispose(); } } } if (((nullable8 == null) == false)) { result.Capability = nullable8; } } else { if ((key == "issued")) { System.Nullable <System.DateTimeOffset> nullable7 = default(System.Nullable <System.DateTimeOffset>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable7 = this._serializer3.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker); disposable3 = unpacker.ReadSubtree(); try { nullable7 = this._serializer3.UnpackFrom(disposable3); } finally { if (((disposable3 == null) == false)) { disposable3.Dispose(); } } } if (nullable7.HasValue) { result.Issued = nullable7.Value; } } else { if ((key == "expires")) { System.Nullable <System.DateTimeOffset> nullable6 = default(System.Nullable <System.DateTimeOffset>); 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 disposable2 = default(MsgPack.Unpacker); disposable2 = unpacker.ReadSubtree(); try { nullable6 = this._serializer3.UnpackFrom(disposable2); } finally { if (((disposable2 == null) == false)) { disposable2.Dispose(); } } } if (nullable6.HasValue) { result.Expires = nullable6.Value; } } else { if ((key == "token")) { string nullable5 = default(string); nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(TokenDetails), "System.String Token"); if (((nullable5 == null) == false)) { result.Token = nullable5; } } else { unpacker.Skip(); } } } } } } } return(result); }