Esempio n. 1
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(_itemFieldNames, field_name, global::System.StringComparer.Ordinal);
                    if (field_ordinal >= 0)
                    {
                        tag = _itemFieldTags[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 10: {
                    result.hasItemId = input.ReadString(ref result.itemId_);
                    break;
                }

                case 26: {
                    result.hasName = input.ReadString(ref result.name_);
                    break;
                }

                case 34: {
                    result.hasDescription = input.ReadString(ref result.description_);
                    break;
                }

                case 42: {
                    result.hasCatalogName = input.ReadString(ref result.catalogName_);
                    break;
                }

                case 50: {
                    result.hasCatalogImageUrl = input.ReadString(ref result.catalogImageUrl_);
                    break;
                }

                case 58: {
                    result.hasItemImageUrl = input.ReadString(ref result.itemImageUrl_);
                    break;
                }

                case 73: {
                    result.hasPrice = input.ReadDouble(ref result.price_);
                    break;
                }
                }
            }

            if (unknownFields != null)
            {
                this.UnknownFields = unknownFields.Build();
            }
            return(this);
        }
Esempio n. 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(_protoDoubleRangeFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _protoDoubleRangeFieldTags[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 9: {
                        result.hasFrom = input.ReadDouble(ref result.from_);
                        break;
                    }

                    case 17: {
                        result.hasTo = input.ReadDouble(ref result.to_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
Esempio n. 3
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(_pbDecodeRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
                    if (field_ordinal >= 0)
                    {
                        tag = _pbDecodeRequestFieldTags[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 10: {
                    result.hasIMEI = input.ReadString(ref result.iMEI_);
                    break;
                }

                case 18: {
                    input.ReadBytesArray(tag, field_name, result.decodes_);
                    break;
                }

                case 25: {
                    result.hasLatitude = input.ReadDouble(ref result.latitude_);
                    break;
                }

                case 33: {
                    result.hasLongitude = input.ReadDouble(ref result.longitude_);
                    break;
                }

                case 42: {
                    result.hasCode = input.ReadString(ref result.code_);
                    break;
                }
                }
            }

            if (unknownFields != null)
            {
                this.UnknownFields = unknownFields.Build();
            }
            return(this);
        }
            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(_lineSensorFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _lineSensorFieldTags[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 10: {
                        global::lth.line_sensor.Point.Builder subBuilder = global::lth.line_sensor.Point.CreateBuilder();
                        if (result.hasSensedPoint)
                        {
                            subBuilder.MergeFrom(SensedPoint);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        SensedPoint = subBuilder.BuildPartial();
                        break;
                    }

                    case 18: {
                        global::lth.line_sensor.Point.Builder subBuilder = global::lth.line_sensor.Point.CreateBuilder();
                        if (result.hasStart)
                        {
                            subBuilder.MergeFrom(Start);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Start = subBuilder.BuildPartial();
                        break;
                    }

                    case 26: {
                        global::lth.line_sensor.Point.Builder subBuilder = global::lth.line_sensor.Point.CreateBuilder();
                        if (result.hasEnd)
                        {
                            subBuilder.MergeFrom(End);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        End = subBuilder.BuildPartial();
                        break;
                    }

                    case 33: {
                        result.hasRadius = input.ReadDouble(ref result.radius_);
                        break;
                    }

                    case 42: {
                        result.hasSensedPart = input.ReadString(ref result.sensedPart_);
                        break;
                    }

                    case 48: {
                        result.hasSensorID = input.ReadUInt32(ref result.sensorID_);
                        break;
                    }
                    }
                }

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