Ejemplo n.º 1
0
        internal void AddEnumValueByNumber(EnumValueDescriptor enumValue)
        {
            DescriptorPool.DescriptorIntPair key = new DescriptorPool.DescriptorIntPair(enumValue.EnumDescriptor, enumValue.Number);
            while (true)
            {
IL_7F:
                uint arg_63_0 = 2334012792u;
                while (true)
                {
                    uint num;
                    switch ((num = (arg_63_0 ^ 3355675090u)) % 4u)
                    {
                    case 0u:
                        goto IL_7F;

                    case 2u:
                        arg_63_0 = (((!this.enumValuesByNumber.ContainsKey(key)) ? 3139572129u : 3625274707u) ^ num * 2510821840u);
                        continue;

                    case 3u:
                        this.enumValuesByNumber[key] = enumValue;
                        arg_63_0 = (num * 4075470653u ^ 3296798132u);
                        continue;
                    }
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        internal void AddFieldByNumber(FieldDescriptor field)
        {
            DescriptorPool.DescriptorIntPair key = new DescriptorPool.DescriptorIntPair(field.ContainingType, field.FieldNumber);
            FieldDescriptor fieldDescriptor;

            if (this.fieldsByNumber.TryGetValue(key, out fieldDescriptor))
            {
                throw new DescriptorValidationException(field, DescriptorPool.smethod_9(new object[]
                {
                    Module.smethod_36 <string>(896911572u),
                    field.FieldNumber,
                    Module.smethod_35 <string>(1732735873u),
                    field.ContainingType.FullName,
                    Module.smethod_34 <string>(3822284802u),
                    fieldDescriptor.Name,
                    Module.smethod_37 <string>(3940659401u)
                }));
            }
            this.fieldsByNumber[key] = field;
        }