Exemplo n.º 1
0
        /// <summary>
        /// Creates an instance for generated code.
        /// </summary>
        /// <remarks>
        /// The <paramref name="generatedCodeInfo"/> parameter should be null for descriptors which don't correspond to
        /// generated types. Otherwise, it should be a <see cref="GeneratedCodeInfo"/> with nested types and nested
        /// enums corresponding to the types and enums contained within the file descriptor.
        /// </remarks>
        public static FileDescriptor InternalBuildGeneratedFileFrom(byte[] descriptorData,
                                                                    FileDescriptor[] dependencies,
                                                                    GeneratedCodeInfo generatedCodeInfo)
        {
            FileDescriptorProto proto;

            try
            {
                proto = FileDescriptorProto.Parser.ParseFrom(descriptorData);
            }
            catch (InvalidProtocolBufferException e)
            {
                throw new ArgumentException("Failed to parse protocol buffer descriptor for generated code.", e);
            }



            try
            {
                // When building descriptors for generated code, we allow unknown
                // dependencies by default.
                return(BuildFrom(ByteString.CopyFrom(descriptorData), proto, dependencies, true, generatedCodeInfo));
            }
            catch (DescriptorValidationException e)
            {
                throw new ArgumentException("Invalid embedded descriptor for \"" + proto.Name + "\".", e);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a GeneratedCodeInfo for a message descriptor, with nested types, nested enums, the CLR type, property names and oneof names.
 /// Each array parameter may be null, to indicate a lack of values.
 /// The parameter order is designed to make it feasible to format the generated code readably.
 /// </summary>
 public GeneratedCodeInfo(Type clrType, string[] propertyNames, string[] oneofNames, Type[] nestedEnums, GeneratedCodeInfo[] nestedTypes)
 {
     NestedTypes = nestedTypes ?? EmptyCodeInfo;
     NestedEnums = nestedEnums ?? ReflectionUtil.EmptyTypes;
     ClrType = clrType;
     PropertyNames = propertyNames ?? EmptyNames;
     OneofNames = oneofNames ?? EmptyNames;
 }
Exemplo n.º 3
0
        private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            this.descriptorData = descriptorData;
            this.pool           = pool;
            this.proto          = proto;
            this.dependencies   = new ReadOnlyCollection <FileDescriptor>((FileDescriptor[])dependencies.Clone());

            publicDependencies = DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependencies);

            pool.AddPackage(Package, this);

            messageTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.MessageType,
                                                                 (message, index) =>
                                                                 new MessageDescriptor(message, this, null, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedTypes[index]));

            enumTypes = DescriptorUtil.ConvertAndMakeReadOnly(proto.EnumType,
                                                              (enumType, index) =>
                                                              new EnumDescriptor(enumType, this, null, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedEnums[index]));

            services = DescriptorUtil.ConvertAndMakeReadOnly(proto.Service,
                                                             (service, index) =>
                                                             new ServiceDescriptor(service, this, index));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Builds a FileDescriptor from its protocol buffer representation.
        /// </summary>
        /// <param name="descriptorData">The original serialized descriptor data.
        /// We have only limited proto2 support, so serializing FileDescriptorProto
        /// would not necessarily give us this.</param>
        /// <param name="proto">The protocol message form of the FileDescriptor.</param>
        /// <param name="dependencies">FileDescriptors corresponding to all of the
        /// file's dependencies, in the exact order listed in the .proto file. May be null,
        /// in which case it is treated as an empty array.</param>
        /// <param name="allowUnknownDependencies">Whether unknown dependencies are ignored (true) or cause an exception to be thrown (false).</param>
        /// <param name="generatedCodeInfo">Reflection information, if any. May be null, specifically for non-generated code.</param>
        /// <exception cref="DescriptorValidationException">If <paramref name="proto"/> is not
        /// a valid descriptor. This can occur for a number of reasons, such as a field
        /// having an undefined type or because two messages were defined with the same name.</exception>
        private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            // Building descriptors involves two steps: translating and linking.
            // In the translation step (implemented by FileDescriptor's
            // constructor), we build an object tree mirroring the
            // FileDescriptorProto's tree and put all of the descriptors into the
            // DescriptorPool's lookup tables.  In the linking step, we look up all
            // type references in the DescriptorPool, so that, for example, a
            // FieldDescriptor for an embedded message contains a pointer directly
            // to the Descriptor for that message's type.  We also detect undefined
            // types in the linking step.
            if (dependencies == null)
            {
                dependencies = new FileDescriptor[0];
            }

            DescriptorPool pool   = new DescriptorPool(dependencies);
            FileDescriptor result = new FileDescriptor(descriptorData, proto, dependencies, pool, allowUnknownDependencies, generatedCodeInfo);

            // Validate that the dependencies we've been passed (as FileDescriptors) are actually the ones we
            // need.
            if (dependencies.Length != proto.Dependency.Count)
            {
                throw new DescriptorValidationException(result,
                                                        "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
                                                        "those listed in the FileDescriptorProto.");
            }
            for (int i = 0; i < proto.Dependency.Count; i++)
            {
                if (dependencies[i].Name != proto.Dependency[i])
                {
                    throw new DescriptorValidationException(result,
                                                            "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
                                                            "those listed in the FileDescriptorProto.");
                }
            }

            result.CrossLink();
            return(result);
        }
Exemplo n.º 5
0
        internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedCodeInfo generatedCodeInfo)
            : base(file, file.ComputeFullName(parent, proto.Name), typeIndex)
        {
            Proto          = proto;
            Parser         = generatedCodeInfo.Parser;
            ClrType        = generatedCodeInfo.ClrType;
            ContainingType = parent;

            // Note use of generatedCodeInfo. rather than generatedCodeInfo?. here... we don't expect
            // to see any nested oneofs, types or enums in "not actually generated" code... we do
            // expect fields though (for map entry messages).
            Oneofs = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.OneofDecl,
                (oneof, index) =>
                new OneofDescriptor(oneof, file, this, index, generatedCodeInfo.OneofNames[index]));

            NestedTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.NestedType,
                (type, index) =>
                new MessageDescriptor(type, file, this, index, generatedCodeInfo.NestedTypes[index]));

            EnumTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.EnumType,
                (type, index) =>
                new EnumDescriptor(type, file, this, index, generatedCodeInfo.NestedEnums[index]));

            fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.Field,
                (field, index) =>
                new FieldDescriptor(field, file, this, index, generatedCodeInfo.PropertyNames[index]));
            fieldsInNumberOrder = new ReadOnlyCollection <FieldDescriptor>(fieldsInDeclarationOrder.OrderBy(field => field.FieldNumber).ToArray());
            // TODO: Use field => field.Proto.JsonName when we're confident it's appropriate. (And then use it in the formatter, too.)
            jsonFieldMap = new ReadOnlyDictionary <string, FieldDescriptor>(fieldsInNumberOrder.ToDictionary(field => JsonFormatter.ToCamelCase(field.Name)));
            file.DescriptorPool.AddSymbol(this);
            Fields = new FieldCollection(this);
        }
Exemplo n.º 6
0
        public static FileDescriptor FromGeneratedCode(byte[] descriptorData, FileDescriptor[] dependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            FileDescriptorProto fileDescriptorProto;

            try
            {
                fileDescriptorProto = FileDescriptorProto.Parser.ParseFrom(descriptorData);
            }
            catch (InvalidProtocolBufferException exception_)
            {
                throw FileDescriptor.smethod_9(Module.smethod_36 <string>(4196006172u), exception_);
            }
            FileDescriptor result;

            try
            {
                result = FileDescriptor.BuildFrom(ByteString.CopyFrom(descriptorData), fileDescriptorProto, dependencies, true, generatedCodeInfo);
            }
            catch (DescriptorValidationException exception_2)
            {
                throw FileDescriptor.smethod_9(FileDescriptor.smethod_10(Module.smethod_33 <string>(3393686726u), new object[]
                {
                    fileDescriptorProto.Name
                }), exception_2);
            }
            return(result);
        }
Exemplo n.º 7
0
        private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            if (dependencies == null)
            {
                goto IL_18;
            }
            goto IL_122;
            uint           arg_D3_0;
            FileDescriptor fileDescriptor;
            int            num2;

            while (true)
            {
IL_CE:
                uint num;
                switch ((num = (arg_D3_0 ^ 4161713641u)) % 12u)
                {
                case 0u:
                    fileDescriptor.CrossLink();
                    arg_D3_0 = (num * 1953233347u ^ 2707760628u);
                    continue;

                case 1u:
                    num2     = 0;
                    arg_D3_0 = 2574715432u;
                    continue;

                case 2u:
                    num2++;
                    arg_D3_0 = 4243801185u;
                    continue;

                case 3u:
                    dependencies = new FileDescriptor[0];
                    arg_D3_0     = (num * 3942966366u ^ 4286440245u);
                    continue;

                case 4u:
                    arg_D3_0 = ((num2 < proto.Dependency.Count) ? 2982469083u : 3757505837u);
                    continue;

                case 5u:
                    arg_D3_0 = (num * 314203903u ^ 1276877662u);
                    continue;

                case 6u:
                    arg_D3_0 = ((!FileDescriptor.smethod_5(dependencies[num2].Name, proto.Dependency[num2])) ? 3773742995u : 2893382989u);
                    continue;

                case 7u:
                    goto IL_18;

                case 8u:
                    goto IL_14B;

                case 10u:
                    goto IL_122;

                case 11u:
                    goto IL_183;
                }
                break;
            }
            return(fileDescriptor);

IL_14B:
            throw new DescriptorValidationException(fileDescriptor, FileDescriptor.smethod_6(Module.smethod_37 <string>(2509052754u), proto.Dependency[num2], Module.smethod_35 <string>(3048061080u), dependencies[num2].Name));
IL_183:
            throw new DescriptorValidationException(fileDescriptor, Module.smethod_33 <string>(2639691648u));
IL_18:
            arg_D3_0 = 3320637418u;
            goto IL_CE;
IL_122:
            DescriptorPool pool = new DescriptorPool(dependencies);

            fileDescriptor = new FileDescriptor(descriptorData, proto, dependencies, pool, allowUnknownDependencies, generatedCodeInfo);
            arg_D3_0       = ((dependencies.Length != proto.Dependency.Count) ? 2984046962u : 2591580144u);
            goto IL_CE;
        }
Exemplo n.º 8
0
        private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            FileDescriptor __4__this;

            while (true)
            {
IL_113:
                uint arg_E7_0 = 3109136426u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_E7_0 ^ 2557234891u)) % 8u)
                    {
                    case 0u:
                        pool.AddPackage(this.Package, this);
                        arg_E7_0 = (num * 1105332455u ^ 1354664894u);
                        continue;

                    case 1u:
                        __4__this = this;
                        arg_E7_0  = (num * 4125576103u ^ 2241118048u);
                        continue;

                    case 2u:
                        this.< Dependencies > k__BackingField       = new ReadOnlyCollection <FileDescriptor>((FileDescriptor[])FileDescriptor.smethod_0(dependencies));
                        this.< PublicDependencies > k__BackingField = FileDescriptor.DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependencies);
                        arg_E7_0 = (num * 2070285500u ^ 1583842795u);
                        continue;

                    case 3u:
                        goto IL_113;

                    case 4u:
                        this.< SerializedData > k__BackingField = descriptorData;
                        arg_E7_0 = (num * 559784837u ^ 3768172688u);
                        continue;

                    case 5u:
                        this.< MessageTypes > k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly <DescriptorProto, MessageDescriptor>(proto.MessageType, (DescriptorProto message, int index) => new MessageDescriptor(message, __4__this, null, index, generatedCodeInfo.NestedTypes[index]));
                        arg_E7_0 = (num * 3261531694u ^ 3702070131u);
                        continue;

                    case 7u:
                        this.< DescriptorPool > k__BackingField = pool;
                        this.< Proto > k__BackingField          = proto;
                        arg_E7_0 = (num * 2550378934u ^ 3723757811u);
                        continue;
                    }
                    goto Block_1;
                }
            }
Block_1:
            this.< EnumTypes > k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly <EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto enumType, int index) => new EnumDescriptor(enumType, __4__this, null, index, generatedCodeInfo.NestedEnums[index]));
            this.< Services > k__BackingField  = DescriptorUtil.ConvertAndMakeReadOnly <ServiceDescriptorProto, ServiceDescriptor>(proto.Service, (ServiceDescriptorProto service, int index) => new ServiceDescriptor(service, this, index));
        }
Exemplo n.º 9
0
 /// <summary>
 /// Creates a GeneratedCodeInfo for a file descriptor, with only types and enums.
 /// </summary>
 public GeneratedCodeInfo(Type[] nestedEnums, GeneratedCodeInfo[] nestedTypes)
     : this(null, null, null, null, nestedEnums, nestedTypes)
 {
 }
Exemplo n.º 10
0
        /// <summary>
        /// Builds a FileDescriptor from its protocol buffer representation.
        /// </summary>
        /// <param name="descriptorData">The original serialized descriptor data.
        /// We have only limited proto2 support, so serializing FileDescriptorProto
        /// would not necessarily give us this.</param>
        /// <param name="proto">The protocol message form of the FileDescriptor.</param>
        /// <param name="dependencies">FileDescriptors corresponding to all of the
        /// file's dependencies, in the exact order listed in the .proto file. May be null,
        /// in which case it is treated as an empty array.</param>
        /// <param name="allowUnknownDependencies">Whether unknown dependencies are ignored (true) or cause an exception to be thrown (false).</param>
        /// <param name="generatedCodeInfo">Reflection information, if any. May be null, specifically for non-generated code.</param>
        /// <exception cref="DescriptorValidationException">If <paramref name="proto"/> is not
        /// a valid descriptor. This can occur for a number of reasons, such as a field
        /// having an undefined type or because two messages were defined with the same name.</exception>
        private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo)
        {
            // Building descriptors involves two steps: translating and linking.
            // In the translation step (implemented by FileDescriptor's
            // constructor), we build an object tree mirroring the
            // FileDescriptorProto's tree and put all of the descriptors into the
            // DescriptorPool's lookup tables.  In the linking step, we look up all
            // type references in the DescriptorPool, so that, for example, a
            // FieldDescriptor for an embedded message contains a pointer directly
            // to the Descriptor for that message's type.  We also detect undefined
            // types in the linking step.
            if (dependencies == null)
            {
                dependencies = new FileDescriptor[0];
            }

            DescriptorPool pool   = new DescriptorPool(dependencies);
            FileDescriptor result = new FileDescriptor(descriptorData, proto, dependencies, pool, allowUnknownDependencies, generatedCodeInfo);

            // TODO(jonskeet): Reinstate these checks, or get rid of them entirely. They aren't in the Java code,
            // and fail for the CustomOptions test right now. (We get "descriptor.proto" vs "google/protobuf/descriptor.proto".)
            //if (dependencies.Length != proto.DependencyCount)
            //{
            //    throw new DescriptorValidationException(result,
            //                                            "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
            //                                            "those listed in the FileDescriptorProto.");
            //}
            //for (int i = 0; i < proto.DependencyCount; i++)
            //{
            //    if (dependencies[i].Name != proto.DependencyList[i])
            //    {
            //        throw new DescriptorValidationException(result,
            //                                                "Dependencies passed to FileDescriptor.BuildFrom() don't match " +
            //                                                "those listed in the FileDescriptorProto.");
            //    }
            //}

            result.CrossLink();
            return(result);
        }
Exemplo n.º 11
0
        internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedCodeInfo generatedCodeInfo)
            : base(file, file.ComputeFullName(parent, proto.Name), typeIndex)
        {
            this.proto    = proto;
            generatedType = generatedCodeInfo == null ? null : generatedCodeInfo.ClrType;

            containingType = parent;

            oneofs = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.OneofDecl,
                (oneof, index) =>
                new OneofDescriptor(oneof, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.OneofNames[index]));

            nestedTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.NestedType,
                (type, index) =>
                new MessageDescriptor(type, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedTypes[index]));

            enumTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.EnumType,
                (type, index) =>
                new EnumDescriptor(type, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedEnums[index]));

            fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.Field,
                (field, index) =>
                new FieldDescriptor(field, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.PropertyNames[index]));
            fieldsInNumberOrder = new ReadOnlyCollection <FieldDescriptor>(fieldsInDeclarationOrder.OrderBy(field => field.FieldNumber).ToArray());
            file.DescriptorPool.AddSymbol(this);
            fields = new FieldCollection(this);
        }
Exemplo n.º 12
0
        internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedCodeInfo generatedCodeInfo)
            : base(file, file.ComputeFullName(parent, proto.Name), typeIndex)
        {
            this.proto    = proto;
            generatedType = generatedCodeInfo == null ? null : generatedCodeInfo.ClrType;

            containingType = parent;

            oneofs = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.OneofDecl,
                (oneof, index) =>
                new OneofDescriptor(oneof, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.OneofNames[index]));

            nestedTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.NestedType,
                (type, index) =>
                new MessageDescriptor(type, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedTypes[index]));

            enumTypes = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.EnumType,
                (type, index) =>
                new EnumDescriptor(type, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.NestedEnums[index]));

            fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly(
                proto.Field,
                (field, index) =>
                new FieldDescriptor(field, file, this, index, generatedCodeInfo == null ? null : generatedCodeInfo.PropertyNames[index]));
            fieldsInNumberOrder = new ReadOnlyCollection <FieldDescriptor>(fieldsInDeclarationOrder.OrderBy(field => field.FieldNumber).ToArray());
            // TODO: Use field => field.Proto.JsonName when we're confident it's appropriate. (And then use it in the formatter, too.)
            jsonFieldMap = new Dictionary <string, FieldDescriptor>(fieldsInNumberOrder.ToDictionary(field => JsonFormatter.ToCamelCase(field.Name)));
            file.DescriptorPool.AddSymbol(this);
            fields = new FieldCollection(this);
        }
Exemplo n.º 13
0
        internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedCodeInfo generatedCodeInfo) : base(file, file.ComputeFullName(parent, proto.Name), typeIndex)
        {
            MessageDescriptor __4__this;

            while (true)
            {
IL_247:
                uint arg_20A_0 = 4043199534u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_20A_0 ^ 3788346645u)) % 12u)
                    {
                    case 0u:
                        this.< ContainingType > k__BackingField = parent;
                        arg_20A_0 = (num * 1002898729u ^ 1601684763u);
                        continue;

                    case 1u:
                    {
                        GeneratedCodeInfo expr_1D9 = generatedCodeInfo;
                        this.< Parser > k__BackingField = ((expr_1D9 != null) ? expr_1D9.Parser : null);
                        arg_20A_0 = 2694476678u;
                        continue;
                    }

                    case 2u:
                        file.DescriptorPool.AddSymbol(this);
                        this.Fieldsk__BackingField = new MessageDescriptor.FieldCollection(this);
                        arg_20A_0 = (num * 174268781u ^ 339015310u);
                        continue;

                    case 3u:
                        goto IL_247;

                    case 4u:
                        this.< NestedTypes > k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly <DescriptorProto, MessageDescriptor>(proto.NestedType, (DescriptorProto type, int index) => new MessageDescriptor(type, file, __4__this, index, generatedCodeInfo.NestedTypes[index]));
                        arg_20A_0 = (num * 1204710165u ^ 359963217u);
                        continue;

                    case 5u:
                    {
                        IEnumerable <FieldDescriptor>  arg_161_0 = this.fieldsInNumberOrder;
                        Func <FieldDescriptor, string> arg_161_1;
                        if ((arg_161_1 = MessageDescriptor.__c.__9__4_5) == null)
                        {
                            arg_161_1 = (MessageDescriptor.__c.__9__4_5 = new Func <FieldDescriptor, string>(MessageDescriptor.__c.__9.<.ctor > b__4_5));
                        }
                        this.jsonFieldMap = new ReadOnlyDictionary <string, FieldDescriptor>(arg_161_0.ToDictionary(arg_161_1));
                        arg_20A_0         = 3491112463u;
                        continue;
                    }

                    case 6u:
                    {
                        this.fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly <FieldDescriptorProto, FieldDescriptor>(proto.Field, delegate(FieldDescriptorProto field, int index)
                            {
                                FileDescriptor arg_26_1    = file;
                                MessageDescriptor arg_26_2 = __4__this;
                                GeneratedCodeInfo expr_14  = generatedCodeInfo;
                                return(new FieldDescriptor(field, arg_26_1, arg_26_2, index, (expr_14 != null) ? expr_14.PropertyNames[index] : null));
                            });
                        IEnumerable <FieldDescriptor> arg_11D_0 = this.fieldsInDeclarationOrder;
                        Func <FieldDescriptor, int>   arg_11D_1;
                        if ((arg_11D_1 = MessageDescriptor.__c.__9__4_4) == null)
                        {
                            arg_11D_1 = (MessageDescriptor.__c.__9__4_4 = new Func <FieldDescriptor, int>(MessageDescriptor.__c.__9.<.ctor > b__4_4));
                        }
                        this.fieldsInNumberOrder = new ReadOnlyCollection <FieldDescriptor>(arg_11D_0.OrderBy(arg_11D_1).ToArray <FieldDescriptor>());
                        arg_20A_0 = 2414391428u;
                        continue;
                    }

                    case 7u:
                    {
                        GeneratedCodeInfo expr_BF = generatedCodeInfo;
                        this.< ClrType > k__BackingField = ((expr_BF != null) ? expr_BF.ClrType : null);
                        arg_20A_0 = 3870743541u;
                        continue;
                    }

                    case 8u:
                        this.< EnumTypes > k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly <EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto type, int index) => new EnumDescriptor(type, file, __4__this, index, generatedCodeInfo.NestedEnums[index]));
                        arg_20A_0 = (num * 3914277205u ^ 2964567391u);
                        continue;

                    case 10u:
                        this.< Oneofs > k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly <OneofDescriptorProto, OneofDescriptor>(proto.OneofDecl, (OneofDescriptorProto oneof, int index) => new OneofDescriptor(oneof, file, __4__this, index, generatedCodeInfo.OneofNames[index]));
                        arg_20A_0 = (num * 3879854900u ^ 3765292269u);
                        continue;

                    case 11u:
                        __4__this = this;
                        this.< Proto > k__BackingField = proto;
                        arg_20A_0 = (num * 1105444768u ^ 1991989292u);
                        continue;
                    }
                    return;
                }
            }
        }