Exemplo n.º 1
0
            public override SendPayRespP.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>(SendPayRespP._sendPayRespPFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SendPayRespP._sendPayRespPFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        BaseRespP.Builder builder = BaseRespP.CreateBuilder();
                        if (this.result.hasBase)
                        {
                            builder.MergeFrom(this.Base);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.Base = builder.BuildPartial();
                        continue;
                    }

                    case 0x12:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasReturnKey = input.ReadString(ref this.result.returnKey_);
                }
                return(this);
            }
Exemplo n.º 2
0
            public override SendPayRespP.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                uint   num;
                string text;

                while (input.ReadTag(out num, out text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(SendPayRespP._sendPayRespPFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, text);
                            continue;
                        }
                        num = SendPayRespP._sendPayRespPFieldTags[num2];
                    }
                    uint num3 = num;
                    if (num3 == 0u)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num3 != 10u)
                    {
                        if (num3 != 18u)
                        {
                            if (WireFormat.IsEndGroupTag(num))
                            {
                                return(this);
                            }
                            this.ParseUnknownField(input, extensionRegistry, num, text);
                        }
                        else
                        {
                            this.result.hasReturnKey = input.ReadString(ref this.result.returnKey_);
                        }
                    }
                    else
                    {
                        BaseRespP.Builder builder = BaseRespP.CreateBuilder();
                        if (this.result.hasBase)
                        {
                            builder.MergeFrom(this.Base);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.Base = builder.BuildPartial();
                    }
                }
                return(this);
            }