Example #1
0
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                PrepareBuilder();
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_msgBuyItemFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _msgBuyItemFieldTags[field_ordinal];
                        }
                        else
                        {
                            ParseUnknownField(input, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            return(this);
                        }
                        ParseUnknownField(input, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 10: {
                        result.hasItemName = input.ReadString(ref result.itemName_);
                        break;
                    }

                    case 16: {
                        result.hasItemId = input.ReadInt64(ref result.itemId_);
                        break;
                    }

                    case 26:
                    case 24: {
                        input.ReadInt32Array(tag, field_name, result.ids_);
                        break;
                    }
                    }
                }

                return(this);
            }
Example #2
0
            public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                PrepareBuilder();
                pb::UnknownFieldSet.Builder unknownFields = null;
                uint   tag;
                string field_name;

                while (input.ReadTag(out tag, out field_name))
                {
                    if (tag == 0 && field_name != null)
                    {
                        int field_ordinal = global::System.Array.BinarySearch(_laidianStatusModelFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _laidianStatusModelFieldTags[field_ordinal];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            continue;
                        }
                    }
                    switch (tag)
                    {
                    case 0: {
                        throw pb::InvalidProtocolBufferException.InvalidTag();
                    }

                    default: {
                        if (pb::WireFormat.IsEndGroupTag(tag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                        break;
                    }

                    case 18: {
                        result.hasType = input.ReadString(ref result.type_);
                        break;
                    }

                    case 26: {
                        result.hasTerminal = input.ReadString(ref result.terminal_);
                        break;
                    }

                    case 34: {
                        result.hasTime = input.ReadString(ref result.time_);
                        break;
                    }

                    case 42: {
                        result.hasVd = input.ReadString(ref result.vd_);
                        break;
                    }

                    case 50: {
                        result.hasSmk = input.ReadString(ref result.smk_);
                        break;
                    }

                    case 58: {
                        result.hasTemp = input.ReadString(ref result.temp_);
                        break;
                    }

                    case 66: {
                        result.hasStatus = input.ReadString(ref result.status_);
                        break;
                    }

                    case 74: {
                        result.hasHsnum = input.ReadString(ref result.hsnum_);
                        break;
                    }

                    case 82: {
                        result.hasLinesstatus = input.ReadString(ref result.linesstatus_);
                        break;
                    }

                    case 90:
                    case 88: {
                        input.ReadInt32Array(tag, field_name, result.lines_);
                        break;
                    }

                    case 98: {
                        input.ReadMessageArray(tag, field_name, result.cdbs_, global::com.imlaidian.protobuf.model.CDBStatusModel.DefaultInstance, extensionRegistry);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }