Ejemplo n.º 1
0
 public GetA8KeyResp.Builder MergeJSAPIPermission(JSAPIPermissionBitSet value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     if (this.result.hasJSAPIPermission && (this.result.jSAPIPermission_ != JSAPIPermissionBitSet.DefaultInstance))
     {
         this.result.jSAPIPermission_ = JSAPIPermissionBitSet.CreateBuilder(this.result.jSAPIPermission_).MergeFrom(value).BuildPartial();
     }
     else
     {
         this.result.jSAPIPermission_ = value;
     }
     this.result.hasJSAPIPermission = true;
     return(this);
 }
Ejemplo n.º 2
0
            public override GetA8KeyResp.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>(GetA8KeyResp._getA8KeyRespFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = GetA8KeyResp._getA8KeyRespFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0x12:
                    {
                        this.result.hasFullURL = input.ReadString(ref this.result.fullURL_);
                        continue;
                    }

                    case 0x1a:
                    {
                        this.result.hasA8Key = input.ReadString(ref this.result.a8Key_);
                        continue;
                    }

                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

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

                    case 0x20:
                    {
                        this.result.hasActionCode = input.ReadUInt32(ref this.result.actionCode_);
                        continue;
                    }

                    case 0x2a:
                    {
                        this.result.hasTitle = input.ReadString(ref this.result.title_);
                        continue;
                    }

                    case 50:
                    {
                        this.result.hasContent = input.ReadString(ref this.result.content_);
                        continue;
                    }

                    case 0x3a:
                    {
                        JSAPIPermissionBitSet.Builder builder2 = JSAPIPermissionBitSet.CreateBuilder();
                        if (this.result.hasJSAPIPermission)
                        {
                            builder2.MergeFrom(this.JSAPIPermission);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.JSAPIPermission = builder2.BuildPartial();
                        continue;
                    }

                    case 0x42:
                    {
                        micromsg.GeneralControlBitSet.Builder builder3 = micromsg.GeneralControlBitSet.CreateBuilder();
                        if (this.result.hasGeneralControlBitSet)
                        {
                            builder3.MergeFrom(this.GeneralControlBitSet);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.GeneralControlBitSet = builder3.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        return(this);
                    }
                    this.ParseUnknownField(input, extensionRegistry, num, str);
                }
                return(this);
            }