public override global::UGF.Utf8Json.Runtime.Tests.TestEncoding.Target Deserialize(ref global::Utf8Json.JsonReader reader, global::Utf8Json.IJsonFormatterResolver formatterResolver)
        {
            if (reader.ReadIsNull())
            {
                return(null);
            }


            var __Value__    = default(string);
            var __Value__b__ = false;

            var ____count = 0;

            reader.ReadIsBeginObjectWithVerify();
            while (!reader.ReadIsEndObjectWithSkipValueSeparator(ref ____count))
            {
                var stringKey = reader.ReadPropertyNameSegmentRaw();
                int key;
                if (!____keyMapping.TryGetValue(stringKey, out key))
                {
                    reader.ReadNextBlock();
                    goto NEXT_LOOP;
                }

                switch (key)
                {
                case 0:
                    __Value__    = reader.ReadString();
                    __Value__b__ = true;
                    break;

                default:
                    reader.ReadNextBlock();
                    break;
                }

NEXT_LOOP:
                continue;
            }

            var ____result = new global::UGF.Utf8Json.Runtime.Tests.TestEncoding.Target();

            if (__Value__b__)
            {
                ____result.Value = __Value__;
            }

            return(____result);
        }
        public override global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget Deserialize(ref global::Utf8Json.JsonReader reader, global::Utf8Json.IJsonFormatterResolver formatterResolver)
        {
            if (reader.ReadIsNull())
            {
                return(null);
            }


            var __Name__           = default(string);
            var __Name__b__        = false;
            var __BoolValue__      = default(bool);
            var __BoolValue__b__   = false;
            var __FloatValue__     = default(float);
            var __FloatValue__b__  = false;
            var __IntValue__       = default(int);
            var __IntValue__b__    = false;
            var __Vector2__        = default(global::UnityEngine.Vector2);
            var __Vector2__b__     = false;
            var __Bounds__         = default(global::UnityEngine.Bounds);
            var __Bounds__b__      = false;
            var __Flags__          = default(global::UnityEngine.HideFlags);
            var __Flags__b__       = false;
            var __ArrayInt__       = default(int[]);
            var __ArrayInt__b__    = false;
            var __ListInt__        = default(global::System.Collections.Generic.List <int>);
            var __ListInt__b__     = false;
            var __ArrayTarget__    = default(global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget2[]);
            var __ArrayTarget__b__ = false;
            var __ListTarget__     = default(global::System.Collections.Generic.List <global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget2>);
            var __ListTarget__b__  = false;
            var __ArrayFrames__    = default(global::UnityEngine.Keyframe[]);
            var __ArrayFrames__b__ = false;

            var ____count = 0;

            reader.ReadIsBeginObjectWithVerify();
            while (!reader.ReadIsEndObjectWithSkipValueSeparator(ref ____count))
            {
                var stringKey = reader.ReadPropertyNameSegmentRaw();
                int key;
                if (!____keyMapping.TryGetValue(stringKey, out key))
                {
                    reader.ReadNextBlock();
                    goto NEXT_LOOP;
                }

                switch (key)
                {
                case 0:
                    __Name__    = reader.ReadString();
                    __Name__b__ = true;
                    break;

                case 1:
                    __BoolValue__    = reader.ReadBoolean();
                    __BoolValue__b__ = true;
                    break;

                case 2:
                    __FloatValue__    = reader.ReadSingle();
                    __FloatValue__b__ = true;
                    break;

                case 3:
                    __IntValue__    = reader.ReadInt32();
                    __IntValue__b__ = true;
                    break;

                case 4:
                    __Vector2__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.Vector2>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __Vector2__b__ = true;
                    break;

                case 5:
                    __Bounds__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.Bounds>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __Bounds__b__ = true;
                    break;

                case 6:
                    __Flags__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.HideFlags>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __Flags__b__ = true;
                    break;

                case 7:
                    __ArrayInt__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <int[]>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __ArrayInt__b__ = true;
                    break;

                case 8:
                    __ListInt__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::System.Collections.Generic.List <int> >(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __ListInt__b__ = true;
                    break;

                case 9:
                    __ArrayTarget__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget2[]>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __ArrayTarget__b__ = true;
                    break;

                case 10:
                    __ListTarget__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::System.Collections.Generic.List <global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget2> >(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __ListTarget__b__ = true;
                    break;

                case 11:
                    __ArrayFrames__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.Keyframe[]>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __ArrayFrames__b__ = true;
                    break;

                default:
                    reader.ReadNextBlock();
                    break;
                }

NEXT_LOOP:
                continue;
            }

            var ____result = new global::UGF.Utf8Json.Runtime.Tests.TestAssembly.TestTarget();

            if (__Name__b__)
            {
                ____result.Name = __Name__;
            }
            if (__BoolValue__b__)
            {
                ____result.BoolValue = __BoolValue__;
            }
            if (__FloatValue__b__)
            {
                ____result.FloatValue = __FloatValue__;
            }
            if (__IntValue__b__)
            {
                ____result.IntValue = __IntValue__;
            }
            if (__Vector2__b__)
            {
                ____result.Vector2 = __Vector2__;
            }
            if (__Bounds__b__)
            {
                ____result.Bounds = __Bounds__;
            }
            if (__Flags__b__)
            {
                ____result.Flags = __Flags__;
            }
            if (__ArrayInt__b__)
            {
                ____result.ArrayInt = __ArrayInt__;
            }
            if (__ListInt__b__)
            {
                ____result.ListInt = __ListInt__;
            }
            if (__ArrayTarget__b__)
            {
                ____result.ArrayTarget = __ArrayTarget__;
            }
            if (__ListTarget__b__)
            {
                ____result.ListTarget = __ListTarget__;
            }
            if (__ArrayFrames__b__)
            {
                ____result.ArrayFrames = __ArrayFrames__;
            }

            return(____result);
        }
示例#3
0
        public global::UGF.Utf8Json.Editor.Tests.TestEditorAssembly.TestEditorTarget Deserialize(ref global::Utf8Json.JsonReader reader, global::Utf8Json.IJsonFormatterResolver formatterResolver)
        {
            if (reader.ReadIsNull())
            {
                return(null);
            }


            var __BoolValue__      = default(bool);
            var __BoolValue__b__   = false;
            var __StringValue__    = default(string);
            var __StringValue__b__ = false;
            var __Vector2__        = default(global::UnityEngine.Vector2);
            var __Vector2__b__     = false;
            var __FloatValue__     = default(float);
            var __FloatValue__b__  = false;
            var __Bounds__         = default(global::UnityEngine.Bounds);
            var __Bounds__b__      = false;

            var ____count = 0;

            reader.ReadIsBeginObjectWithVerify();
            while (!reader.ReadIsEndObjectWithSkipValueSeparator(ref ____count))
            {
                var stringKey = reader.ReadPropertyNameSegmentRaw();
                int key;
                if (!____keyMapping.TryGetValue(stringKey, out key))
                {
                    reader.ReadNextBlock();
                    goto NEXT_LOOP;
                }

                switch (key)
                {
                case 0:
                    __BoolValue__    = reader.ReadBoolean();
                    __BoolValue__b__ = true;
                    break;

                case 1:
                    __StringValue__    = reader.ReadString();
                    __StringValue__b__ = true;
                    break;

                case 2:
                    __Vector2__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.Vector2>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __Vector2__b__ = true;
                    break;

                case 3:
                    __FloatValue__    = reader.ReadSingle();
                    __FloatValue__b__ = true;
                    break;

                case 4:
                    __Bounds__    = global::Utf8Json.JsonFormatterResolverExtensions.GetFormatterWithVerify <global::UnityEngine.Bounds>(formatterResolver).Deserialize(ref reader, formatterResolver);
                    __Bounds__b__ = true;
                    break;

                default:
                    reader.ReadNextBlock();
                    break;
                }

NEXT_LOOP:
                continue;
            }

            var ____result = new global::UGF.Utf8Json.Editor.Tests.TestEditorAssembly.TestEditorTarget();

            if (__BoolValue__b__)
            {
                ____result.BoolValue = __BoolValue__;
            }
            if (__StringValue__b__)
            {
                ____result.StringValue = __StringValue__;
            }
            if (__Vector2__b__)
            {
                ____result.Vector2 = __Vector2__;
            }
            if (__FloatValue__b__)
            {
                ____result.FloatValue = __FloatValue__;
            }
            if (__Bounds__b__)
            {
                ____result.Bounds = __Bounds__;
            }

            return(____result);
        }