示例#1
0
 public SnsCommentRequest.Builder SetAction(SnsActionGroup value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     this.result.hasAction = true;
     this.result.action_   = value;
     return(this);
 }
示例#2
0
 public SnsCommentRequest.Builder MergeAction(SnsActionGroup value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     if (this.result.hasAction && (this.result.action_ != SnsActionGroup.DefaultInstance))
     {
         this.result.action_ = SnsActionGroup.CreateBuilder(this.result.action_).MergeFrom(value).BuildPartial();
     }
     else
     {
         this.result.action_ = value;
     }
     this.result.hasAction = true;
     return(this);
 }
示例#3
0
            public override SnsCommentRequest.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>(SnsCommentRequest._snsCommentRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsCommentRequest._snsCommentRequestFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        micromsg.BaseRequest.Builder builder = micromsg.BaseRequest.CreateBuilder();
                        if (this.result.hasBaseRequest)
                        {
                            builder.MergeFrom(this.BaseRequest);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.BaseRequest = builder.BuildPartial();
                        continue;
                    }

                    case 0x12:
                    {
                        SnsActionGroup.Builder builder2 = SnsActionGroup.CreateBuilder();
                        if (this.result.hasAction)
                        {
                            builder2.MergeFrom(this.Action);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Action = builder2.BuildPartial();
                        continue;
                    }

                    case 0x1a:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasClientId = input.ReadString(ref this.result.clientId_);
                }
                return(this);
            }