Пример #1
0
 public ModDisturbSetting.Builder SetDisturbSetting(micromsg.DisturbSetting.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasDisturbSetting = true;
     this.result.disturbSetting_   = builderForValue.Build();
     return(this);
 }
Пример #2
0
            public override ModDisturbSetting.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                while (input.ReadTag(out num, out str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(ModDisturbSetting._modDisturbSettingFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = ModDisturbSetting._modDisturbSettingFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        micromsg.DisturbSetting.Builder builder = micromsg.DisturbSetting.CreateBuilder();
                        if (this.result.hasDisturbSetting)
                        {
                            builder.MergeFrom(this.DisturbSetting);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.DisturbSetting = builder.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        return(this);
                    }
                    this.ParseUnknownField(input, extensionRegistry, num, str);
                }
                return(this);
            }