Ejemplo 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(_transportationTaskFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _transportationTaskFieldTags[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::atwork_pb_msgs.ObjectIdentifier.Builder subBuilder = global::atwork_pb_msgs.ObjectIdentifier.CreateBuilder();
                        if (result.hasObject)
                        {
                            subBuilder.MergeFrom(Object);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Object = subBuilder.BuildPartial();
                        break;
                    }

                    case 18: {
                        global::atwork_pb_msgs.ObjectIdentifier.Builder subBuilder = global::atwork_pb_msgs.ObjectIdentifier.CreateBuilder();
                        if (result.hasContainer)
                        {
                            subBuilder.MergeFrom(Container);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Container = subBuilder.BuildPartial();
                        break;
                    }

                    case 24: {
                        result.hasQuantityDelivered = input.ReadUInt64(ref result.quantityDelivered_);
                        break;
                    }

                    case 32: {
                        result.hasQuantityRequested = input.ReadUInt64(ref result.quantityRequested_);
                        break;
                    }

                    case 42: {
                        global::atwork_pb_msgs.LocationIdentifier.Builder subBuilder = global::atwork_pb_msgs.LocationIdentifier.CreateBuilder();
                        if (result.hasDestination)
                        {
                            subBuilder.MergeFrom(Destination);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Destination = subBuilder.BuildPartial();
                        break;
                    }

                    case 50: {
                        global::atwork_pb_msgs.LocationIdentifier.Builder subBuilder = global::atwork_pb_msgs.LocationIdentifier.CreateBuilder();
                        if (result.hasSource)
                        {
                            subBuilder.MergeFrom(Source);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Source = subBuilder.BuildPartial();
                        break;
                    }

                    case 58: {
                        result.hasProcessingTeam = input.ReadString(ref result.processingTeam_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
Ejemplo 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(_navigationTaskFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _navigationTaskFieldTags[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::atwork_pb_msgs.LocationIdentifier.Builder subBuilder = global::atwork_pb_msgs.LocationIdentifier.CreateBuilder();
                        if (result.hasLocation)
                        {
                            subBuilder.MergeFrom(Location);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Location = subBuilder.BuildPartial();
                        break;
                    }

                    case 16: {
                        object unknown;
                        if (input.ReadEnum(ref result.orientation_, out unknown))
                        {
                            result.hasOrientation = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(2, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 26: {
                        global::atwork_pb_msgs.Time.Builder subBuilder = global::atwork_pb_msgs.Time.CreateBuilder();
                        if (result.hasWaitTime)
                        {
                            subBuilder.MergeFrom(WaitTime);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        WaitTime = subBuilder.BuildPartial();
                        break;
                    }
                    }
                }

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