protected internal override MsgPack.Serialization.Outer UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.Outer result = default(MsgPack.Serialization.Outer);
     result = new MsgPack.Serialization.Outer();
     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.Outer), "System.String A");
         }
         if (((nullable == null)
              == false))
         {
             result.A = nullable;
         }
         unpacked = (unpacked + 1);
         MsgPack.Serialization.Inner nullable0 = default(MsgPack.Serialization.Inner);
         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.Inner = nullable0;
         }
         unpacked = (unpacked + 1);
         string nullable1 = default(string);
         if ((unpacked < itemsCount))
         {
             nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.Outer), "System.String O");
         }
         if (((nullable1 == null)
              == false))
         {
             result.O = 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.Outer), "MemberName");
             if (((nullable2 == null)
                  == false))
             {
                 key = nullable2;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "O"))
             {
                 string nullable5 = default(string);
                 nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.Outer), "System.String O");
                 if (((nullable5 == null)
                      == false))
                 {
                     result.O = nullable5;
                 }
             }
             else
             {
                 if ((key == "Inner"))
                 {
                     MsgPack.Serialization.Inner nullable4 = default(MsgPack.Serialization.Inner);
                     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 disposable0 = default(MsgPack.Unpacker);
                         disposable0 = unpacker.ReadSubtree();
                         try {
                             nullable4 = this._serializer1.UnpackFrom(disposable0);
                         }
                         finally {
                             if (((disposable0 == null)
                                  == false))
                             {
                                 disposable0.Dispose();
                             }
                         }
                     }
                     if (((nullable4 == null)
                          == false))
                     {
                         result.Inner = nullable4;
                     }
                 }
                 else
                 {
                     if ((key == "A"))
                     {
                         string nullable3 = default(string);
                         nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.Outer), "System.String A");
                         if (((nullable3 == null)
                              == false))
                         {
                             result.A = nullable3;
                         }
                     }
                 }
             }
         }
     }
     return(result);
 }
        protected internal override System.Threading.Tasks.Task <MsgPack.Serialization.AddOnlyCollection <System.DateTime> > UnpackFromAsyncCore(MsgPack.Unpacker unpacker, System.Threading.CancellationToken cancellationToken)
        {
            if ((unpacker.IsArrayHeader == false))
            {
                MsgPack.Serialization.SerializationExceptions.ThrowIsNotArrayHeader(unpacker);
            }
            int itemsCount = default(int);

            itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
            MsgPack.Serialization.UnpackCollectionAsyncParameters <MsgPack.Serialization.AddOnlyCollection <System.DateTime> > unpackHelperParameters = default(MsgPack.Serialization.UnpackCollectionAsyncParameters <MsgPack.Serialization.AddOnlyCollection <System.DateTime> >);
            unpackHelperParameters.Unpacker          = unpacker;
            unpackHelperParameters.ItemsCount        = itemsCount;
            unpackHelperParameters.Collection        = this.CreateInstance(itemsCount);
            unpackHelperParameters.BulkOperation     = this._unpackToAsync;
            unpackHelperParameters.EachOperation     = null;
            unpackHelperParameters.CancellationToken = cancellationToken;
            return(MsgPack.Serialization.UnpackHelpers.UnpackCollectionAsync <MsgPack.Serialization.AddOnlyCollection <System.DateTime> >(ref unpackHelperParameters));
        }
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker) {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor);
     if (unpacker.IsArrayHeader) {
         int unpacked = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         MsgPack.Serialization.FileSystemEntry ctorArg0 = default(MsgPack.Serialization.FileSystemEntry);
         ctorArg0 = null;
         MsgPack.Serialization.FileSystemEntry nullable = default(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)) {
             ctorArg0 = nullable;
         }
         unpacked = (unpacked + 1);
         result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor(ctorArg0);
     }
     else {
         int itemsCount0 = default(int);
         itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         MsgPack.Serialization.FileSystemEntry ctorArg00 = default(MsgPack.Serialization.FileSystemEntry);
         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.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor), "MemberName");
             if (((nullable0 == null) 
                         == false)) {
                 key = nullable0;
             }
             else {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "Polymorphic")) {
                 MsgPack.Serialization.FileSystemEntry nullable1 = default(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)) {
                     ctorArg00 = nullable1;
                 }
             }
             else {
                 unpacker.Skip();
             }
         }
         result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor(ctorArg00);
     }
     return result;
 }
Esempio n. 4
0
 protected internal override System.Threading.Tasks.Task <MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject> UnpackFromAsyncCore(MsgPack.Unpacker unpacker, System.Threading.CancellationToken cancellationToken)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArrayAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject>(), this._memberNames, this._unpackOperationListAsync, cancellationToken));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMapAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject>(), this._unpackOperationTableAsync, cancellationToken));
     }
 }
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty>(), this._memberNames, this._unpackOperationList));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty>(), this._unpackOperationTable));
     }
 }
Esempio n. 6
0
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor);
     if (unpacker.IsArrayHeader)
     {
         int unpacked   = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         int ctorArg0 = default(int);
         ctorArg0 = 0;
         System.Nullable <int> nullable = default(System.Nullable <int>);
         if ((unpacked < itemsCount))
         {
             nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor), "Int32 Primitive");
         }
         if (nullable.HasValue)
         {
             ctorArg0 = nullable.Value;
         }
         unpacked = (unpacked + 1);
         result   = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor(ctorArg0);
     }
     else
     {
         int itemsCount0 = default(int);
         itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         int ctorArg00 = default(int);
         ctorArg00 = 0;
         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_Normal_PrimitiveGetOnlyPropertyAndConstructor), "MemberName");
             if (((nullable0 == null)
                  == false))
             {
                 key = nullable0;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "Primitive"))
             {
                 System.Nullable <int> nullable1 = default(System.Nullable <int>);
                 nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor), "Int32 Primitive");
                 if (nullable1.HasValue)
                 {
                     ctorArg00 = nullable1.Value;
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
         result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor(ctorArg00);
     }
     return(result);
 }
Esempio n. 7
0
 private void UnpackValueOfPolymorphic(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(object), "Polymorphic", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfPolymorphicDelegate);
 }
Esempio n. 8
0
 protected internal override System.Collections.Generic.Dictionary <string, int> UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     if ((unpacker.IsMapHeader == false))
     {
         throw MsgPack.Serialization.SerializationExceptions.NewIsNotMapHeader();
     }
     System.Collections.Generic.Dictionary <string, int> collection = default(System.Collections.Generic.Dictionary <string, int>);
     collection = new System.Collections.Generic.Dictionary <string, int>(MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker));
     this.UnpackToCore(unpacker, collection);
     return(collection);
 }
 protected internal override MsgPack.Serialization.ComplexTypeWithDataContractWithOrder UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.ComplexTypeWithDataContractWithOrder result = default(MsgPack.Serialization.ComplexTypeWithDataContractWithOrder);
     result = new MsgPack.Serialization.ComplexTypeWithDataContractWithOrder();
     if (unpacker.IsArrayHeader)
     {
         int unpacked   = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         System.Uri nullable = default(System.Uri);
         if ((unpacked < itemsCount))
         {
             if ((unpacker.Read() == false))
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0);
             }
             if (((unpacker.IsArrayHeader == false) &&
                  (unpacker.IsMapHeader == false)))
             {
                 nullable = this._serializer1.UnpackFrom(unpacker);
             }
             else
             {
                 MsgPack.Unpacker disposable = default(MsgPack.Unpacker);
                 disposable = unpacker.ReadSubtree();
                 try {
                     nullable = this._serializer1.UnpackFrom(disposable);
                 }
                 finally {
                     if (((disposable == null)
                          == false))
                     {
                         disposable.Dispose();
                     }
                 }
             }
         }
         if (((nullable == null)
              == false))
         {
             result.Source = nullable;
         }
         unpacked = (unpacked + 1);
         byte[] nullable0 = default(byte[]);
         if ((unpacked < itemsCount))
         {
             nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithDataContractWithOrder), "Byte[] Data");
         }
         if (((nullable0 == null)
              == false))
         {
             result.Data = nullable0;
         }
         unpacked = (unpacked + 1);
         System.Nullable <System.DateTime> nullable1 = default(System.Nullable <System.DateTime>);
         if ((unpacked < itemsCount))
         {
             if ((unpacker.Read() == false))
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(2);
             }
             if (((unpacker.IsArrayHeader == false) &&
                  (unpacker.IsMapHeader == false)))
             {
                 nullable1 = this._serializer5.UnpackFrom(unpacker);
             }
             else
             {
                 MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker);
                 disposable0 = unpacker.ReadSubtree();
                 try {
                     nullable1 = this._serializer5.UnpackFrom(disposable0);
                 }
                 finally {
                     if (((disposable0 == null)
                          == false))
                     {
                         disposable0.Dispose();
                     }
                 }
             }
         }
         if (nullable1.HasValue)
         {
             result.TimeStamp = nullable1.Value;
         }
         unpacked = (unpacked + 1);
         System.Collections.Generic.Dictionary <System.DateTime, string> nullable2 = default(System.Collections.Generic.Dictionary <System.DateTime, string>);
         if ((unpacked < itemsCount))
         {
             if ((unpacker.Read() == false))
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(3);
             }
             if (((unpacker.IsArrayHeader == false) &&
                  (unpacker.IsMapHeader == false)))
             {
                 nullable2 = this._serializer4.UnpackFrom(unpacker);
             }
             else
             {
                 MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker);
                 disposable1 = unpacker.ReadSubtree();
                 try {
                     nullable2 = this._serializer4.UnpackFrom(disposable1);
                 }
                 finally {
                     if (((disposable1 == null)
                          == false))
                     {
                         disposable1.Dispose();
                     }
                 }
             }
         }
         if (((nullable2 == null)
              == false))
         {
             System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator = nullable2.GetEnumerator();
             System.Collections.Generic.KeyValuePair <System.DateTime, string>           current;
             try {
                 for (
                     ; enumerator.MoveNext();
                     )
                 {
                     current = enumerator.Current;
                     result.History.Add(current.Key, current.Value);
                 }
             }
             finally {
                 enumerator.Dispose();
             }
         }
         unpacked = (unpacked + 1);
     }
     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.ComplexTypeWithDataContractWithOrder), "MemberName");
             if (((nullable3 == null)
                  == false))
             {
                 key = nullable3;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "History"))
             {
                 System.Collections.Generic.Dictionary <System.DateTime, string> nullable7 = 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)))
                 {
                     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 == null)
                      == false))
                 {
                     System.Collections.Generic.Dictionary <System.DateTime, string> .Enumerator enumerator0 = nullable7.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 == "TimeStamp"))
                 {
                     System.Nullable <System.DateTime> nullable6 = default(System.Nullable <System.DateTime>);
                     if ((unpacker.Read() == false))
                     {
                         throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i);
                     }
                     if (((unpacker.IsArrayHeader == false) &&
                          (unpacker.IsMapHeader == false)))
                     {
                         nullable6 = this._serializer5.UnpackFrom(unpacker);
                     }
                     else
                     {
                         MsgPack.Unpacker disposable3 = default(MsgPack.Unpacker);
                         disposable3 = unpacker.ReadSubtree();
                         try {
                             nullable6 = this._serializer5.UnpackFrom(disposable3);
                         }
                         finally {
                             if (((disposable3 == null)
                                  == false))
                             {
                                 disposable3.Dispose();
                             }
                         }
                     }
                     if (nullable6.HasValue)
                     {
                         result.TimeStamp = nullable6.Value;
                     }
                 }
                 else
                 {
                     if ((key == "Data"))
                     {
                         byte[] nullable5 = default(byte[]);
                         nullable5 = MsgPack.Serialization.UnpackHelpers.UnpackBinaryValue(unpacker, typeof(MsgPack.Serialization.ComplexTypeWithDataContractWithOrder), "Byte[] Data");
                         if (((nullable5 == null)
                              == false))
                         {
                             result.Data = nullable5;
                         }
                     }
                     else
                     {
                         if ((key == "Source"))
                         {
                             System.Uri nullable4 = default(System.Uri);
                             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 disposable2 = default(MsgPack.Unpacker);
                                 disposable2 = unpacker.ReadSubtree();
                                 try {
                                     nullable4 = this._serializer1.UnpackFrom(disposable2);
                                 }
                                 finally {
                                     if (((disposable2 == null)
                                          == false))
                                     {
                                         disposable2.Dispose();
                                     }
                                 }
                             }
                             if (((nullable4 == null)
                                  == false))
                             {
                                 result.Source = nullable4;
                             }
                         }
                         else
                         {
                             unpacker.Skip();
                         }
                     }
                 }
             }
         }
     }
     return(result);
 }
 private void UnpackValueOfValue(MsgPack.Unpacker unpacker, UnpackingContext unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(object), "Value", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfValueDelegate);
 }
 protected internal override MsgPack.Serialization.InterfaceMemberRuntimeType UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.InterfaceMemberRuntimeType result = default(MsgPack.Serialization.InterfaceMemberRuntimeType);
     result = new MsgPack.Serialization.InterfaceMemberRuntimeType();
     if (unpacker.IsArrayHeader)
     {
         int unpacked   = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         MsgPack.Serialization.IFileSystemEntry nullable = default(MsgPack.Serialization.IFileSystemEntry);
         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.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.InterfaceMemberRuntimeType), "MemberName");
             if (((nullable0 == null)
                  == false))
             {
                 key = nullable0;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "Value"))
             {
                 MsgPack.Serialization.IFileSystemEntry nullable1 = default(MsgPack.Serialization.IFileSystemEntry);
                 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))
                 {
                     result.Value = nullable1;
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
     }
     return(result);
 }
Esempio n. 12
0
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField>(), this._memberNames, this._unpackOperationList));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField>(), this._unpackOperationTable));
     }
 }
Esempio n. 13
0
 private System.Threading.Tasks.Task UnpackValueOfDictStaticKeyAndStaticItemAsync(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty unpackingContext, int indexOfItem, int itemsCount, System.Threading.CancellationToken cancellationToken)
 {
     return(MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValueAsync(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(System.Collections.Generic.IDictionary <string, string>), "DictStaticKeyAndStaticItem", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfDictStaticKeyAndStaticItemDelegate, cancellationToken));
 }
Esempio n. 14
0
 private void UnpackValueOfDictStaticKeyAndStaticItem(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(System.Collections.Generic.IDictionary <string, string>), "DictStaticKeyAndStaticItem", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfDictStaticKeyAndStaticItemDelegate);
 }
Esempio n. 15
0
 private System.Threading.Tasks.Task UnpackValueOfDictPolymorphicKeyAndStaticItemAsync(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty unpackingContext, int indexOfItem, int itemsCount, System.Threading.CancellationToken cancellationToken)
 {
     MsgPack.Serialization.UnpackReferenceTypeValueAsyncParameters <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty, System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string> > unpackHelperParameters = default(MsgPack.Serialization.UnpackReferenceTypeValueAsyncParameters <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty, System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string> >);
     unpackHelperParameters.Unpacker          = unpacker;
     unpackHelperParameters.UnpackingContext  = unpackingContext;
     unpackHelperParameters.Serializer        = this._serializer0;
     unpackHelperParameters.ItemsCount        = itemsCount;
     unpackHelperParameters.Unpacked          = indexOfItem;
     unpackHelperParameters.TargetObjectType  = typeof(System.Collections.Generic.IDictionary <MsgPack.Serialization.FileSystemEntry, string>);
     unpackHelperParameters.MemberName        = "DictPolymorphicKeyAndStaticItem";
     unpackHelperParameters.NilImplication    = MsgPack.Serialization.NilImplication.MemberDefault;
     unpackHelperParameters.DirectRead        = null;
     unpackHelperParameters.Setter            = this.this_SetUnpackedValueOfDictPolymorphicKeyAndStaticItemDelegate;
     unpackHelperParameters.CancellationToken = cancellationToken;
     return(MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValueAsync(ref unpackHelperParameters));
 }
Esempio n. 16
0
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor();
     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> 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))
         {
             this._methodBasePolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_set_Tuple7AllStatic0.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_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor), "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))
                 {
                     this._methodBasePolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_set_Tuple7AllStatic0.Invoke(result, new object[] {
                         nullable1
                     });
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
     }
     return(result);
 }
Esempio n. 17
0
 protected internal override System.Threading.Tasks.Task <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty> UnpackFromAsyncCore(MsgPack.Unpacker unpacker, System.Threading.CancellationToken cancellationToken)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArrayAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty>(), this._memberNames, this._unpackOperationListAsync, cancellationToken));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMapAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty>(), this._unpackOperationTableAsync, cancellationToken));
     }
 }
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField);
     result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField>(), this._memberNames, this._unpackOperationList));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField>(), this._unpackOperationTable));
     }
 }
        protected internal override MsgPack.Serialization.AddOnlyCollection <System.DateTime> UnpackFromCore(MsgPack.Unpacker unpacker)
        {
            if ((unpacker.IsArrayHeader == false))
            {
                throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
            }
            int itemsCount = default(int);

            itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
            MsgPack.Serialization.AddOnlyCollection <System.DateTime> collection = default(MsgPack.Serialization.AddOnlyCollection <System.DateTime>);
            collection = new MsgPack.Serialization.AddOnlyCollection <System.DateTime>();
            this.UnpackToCore(unpacker, collection);
            return(collection);
        }
 private System.Threading.Tasks.Task UnpackValueOfListPolymorphicItselfAsync(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField unpackingContext, int indexOfItem, int itemsCount, System.Threading.CancellationToken cancellationToken)
 {
     return(MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValueAsync(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(System.Collections.Generic.IList <string>), "ListPolymorphicItself", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfListPolymorphicItselfDelegate, cancellationToken));
 }
Esempio n. 21
0
 private System.Threading.Tasks.Task UnpackValueOfPolymorphicAsync(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject unpackingContext, int indexOfItem, int itemsCount, System.Threading.CancellationToken cancellationToken)
 {
     return(MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValueAsync(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(object), "Polymorphic", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfPolymorphicDelegate, cancellationToken));
 }
 protected internal override System.Threading.Tasks.Task <MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField> UnpackFromAsyncCore(MsgPack.Unpacker unpacker, System.Threading.CancellationToken cancellationToken)
 {
     MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField);
     result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField();
     if (unpacker.IsArrayHeader)
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromArrayAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField>(), this._memberNames, this._unpackOperationListAsync, cancellationToken));
     }
     else
     {
         return(MsgPack.Serialization.UnpackHelpers.UnpackFromMapAsync(unpacker, result, MsgPack.Serialization.UnpackHelpers.GetIdentity <MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField>(), this._unpackOperationTableAsync, cancellationToken));
     }
 }
 private void UnpackValueOfListPolymorphicItself(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(System.Collections.Generic.IList <string>), "ListPolymorphicItself", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfListPolymorphicItselfDelegate);
 }
Esempio n. 24
0
        protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor UnpackFromCore(MsgPack.Unpacker unpacker)
        {
            UnpackingContext unpackingContext = default(UnpackingContext);
            string           ctorArg0         = default(string);

            ctorArg0         = null;
            unpackingContext = new UnpackingContext(ctorArg0);
            if (unpacker.IsArrayHeader)
            {
                return(MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, unpackingContext, this.this_CreateInstanceFromContextDelegate, this._memberNames, this._unpackOperationList));
            }
            else
            {
                return(MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, unpackingContext, this.this_CreateInstanceFromContextDelegate, this._unpackOperationTable));
            }
        }
Esempio n. 25
0
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty();
     if (unpacker.IsArrayHeader)
     {
         int unpacked   = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry> nullable = default(System.Collections.Generic.IList <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._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))
         {
             if ((result.ListPolymorphicItem == null))
             {
                 this._methodBasePolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_set_ListPolymorphicItem0.Invoke(result, new object[] {
                     nullable
                 });
             }
             else
             {
                 System.Collections.Generic.IEnumerator <MsgPack.Serialization.FileSystemEntry> enumerator = nullable.GetEnumerator();
                 MsgPack.Serialization.FileSystemEntry current;
                 try {
                     for (
                         ; enumerator.MoveNext();
                         )
                     {
                         current = enumerator.Current;
                         result.ListPolymorphicItem.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_ListPolymorphicItemPrivateSetterCollectionProperty), "MemberName");
             if (((nullable0 == null)
                  == false))
             {
                 key = nullable0;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "ListPolymorphicItem"))
             {
                 System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry> nullable1 = default(System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry>);
                 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))
                 {
                     if ((result.ListPolymorphicItem == null))
                     {
                         this._methodBasePolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_set_ListPolymorphicItem0.Invoke(result, new object[] {
                             nullable1
                         });
                     }
                     else
                     {
                         System.Collections.Generic.IEnumerator <MsgPack.Serialization.FileSystemEntry> enumerator0 = nullable1.GetEnumerator();
                         MsgPack.Serialization.FileSystemEntry current0;
                         try {
                             for (
                                 ; enumerator0.MoveNext();
                                 )
                             {
                                 current0 = enumerator0.Current;
                                 result.ListPolymorphicItem.Add(current0);
                             }
                         }
                         finally {
                             enumerator0.Dispose();
                         }
                     }
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
     }
     return(result);
 }
Esempio n. 26
0
 private void UnpackValueOfString(MsgPack.Unpacker unpacker, UnpackingContext unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(string), "String", MsgPack.Serialization.NilImplication.MemberDefault, this.MsgPack_Serialization_UnpackHelpers_UnpackStringValueDelegate, this.this_SetUnpackedValueOfStringDelegate);
 }
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField);
     result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField();
     if (unpacker.IsArrayHeader)
     {
         int unpacked   = default(int);
         int itemsCount = default(int);
         itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
         System.Collections.Generic.IDictionary <string, object> nullable = default(System.Collections.Generic.IDictionary <string, 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))
         {
             System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <string, object> > enumerator = nullable.GetEnumerator();
             System.Collections.Generic.KeyValuePair <string, object> current;
             try {
                 for (
                     ; enumerator.MoveNext();
                     )
                 {
                     current = enumerator.Current;
                     result.DictStaticKeyAndObjectItem.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_DictStaticKeyAndObjectItemReadOnlyCollectionField), "MemberName");
             if (((nullable0 == null)
                  == false))
             {
                 key = nullable0;
             }
             else
             {
                 throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName");
             }
             if ((key == "DictStaticKeyAndObjectItem"))
             {
                 System.Collections.Generic.IDictionary <string, object> nullable1 = default(System.Collections.Generic.IDictionary <string, 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))
                 {
                     System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <string, object> > enumerator0 = nullable1.GetEnumerator();
                     System.Collections.Generic.KeyValuePair <string, object> current0;
                     try {
                         for (
                             ; enumerator0.MoveNext();
                             )
                         {
                             current0 = enumerator0.Current;
                             result.DictStaticKeyAndObjectItem.Add(current0.Key, current0.Value);
                         }
                     }
                     finally {
                         enumerator0.Dispose();
                     }
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
     }
     return(result);
 }
Esempio n. 28
0
        protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject UnpackFromCore(MsgPack.Unpacker unpacker)
        {
            UnpackingContext unpackingContext = default(UnpackingContext);
            object           ctorArg0         = default(object);

            ctorArg0         = null;
            unpackingContext = new UnpackingContext(ctorArg0);
            if (unpacker.IsArrayHeader)
            {
                return(MsgPack.Serialization.UnpackHelpers.UnpackFromArray(unpacker, unpackingContext, this.this_CreateInstanceFromContextDelegate, this._memberNames, this._unpackOperationList));
            }
            else
            {
                return(MsgPack.Serialization.UnpackHelpers.UnpackFromMap(unpacker, unpackingContext, this.this_CreateInstanceFromContextDelegate, this._unpackOperationTable));
            }
        }
 protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty UnpackFromCore(MsgPack.Unpacker unpacker)
 {
     MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty);
     result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty();
     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))
         {
             result.DictObjectItself = 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_DictObjectItselfReadWriteProperty), "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))
                 {
                     result.DictObjectItself = nullable1;
                 }
             }
             else
             {
                 unpacker.Skip();
             }
         }
     }
     return(result);
 }
Esempio n. 30
0
 private void UnpackValueOfListObjectItself(MsgPack.Unpacker unpacker, MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty unpackingContext, int indexOfItem, int itemsCount)
 {
     MsgPack.Serialization.UnpackHelpers.UnpackReferenceTypeValue(unpacker, unpackingContext, this._serializer0, itemsCount, indexOfItem, typeof(object), "ListObjectItself", MsgPack.Serialization.NilImplication.MemberDefault, null, this.this_SetUnpackedValueOfListObjectItselfDelegate);
 }