コード例 #1
0
ファイル: SearchTypes.cs プロジェクト: jkloop45/d3sharp
 public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
   pb::UnknownFieldSet.Builder unknownFields = null;
   while (true) {
     uint tag = input.ReadTag();
     switch (tag) {
       case 0: {
         if (unknownFields != null) {
           this.UnknownFields = unknownFields.Build();
         }
         return this;
       }
       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);
         break;
       }
       case 10: {
         global::bnet.protocol.search.Statistic.Builder subBuilder = global::bnet.protocol.search.Statistic.CreateBuilder();
         if (HasStatistic) {
           subBuilder.MergeFrom(Statistic);
         }
         input.ReadMessage(subBuilder, extensionRegistry);
         Statistic = subBuilder.BuildPartial();
         break;
       }
       case 16: {
         int rawValue = input.ReadEnum();
         if (!global::System.Enum.IsDefined(typeof(global::bnet.protocol.search.Filter.Types.Comparand), rawValue)) {
           if (unknownFields == null) {
             unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
           }
           unknownFields.MergeVarintField(2, (ulong) rawValue);
         } else {
           Comparand = (global::bnet.protocol.search.Filter.Types.Comparand) rawValue;
         }
         break;
       }
       case 24: {
         int rawValue = input.ReadEnum();
         if (!global::System.Enum.IsDefined(typeof(global::bnet.protocol.search.Filter.Types.SortDirection), rawValue)) {
           if (unknownFields == null) {
             unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
           }
           unknownFields.MergeVarintField(3, (ulong) rawValue);
         } else {
           SortDirection = (global::bnet.protocol.search.Filter.Types.SortDirection) rawValue;
         }
         break;
       }
     }
   }
 }
コード例 #2
0
                    public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry)
                    {
                        pb::UnknownFieldSet.Builder unknownFields = null;
                        while (true)
                        {
                            uint tag = input.ReadTag();
                            switch (tag)
                            {
                            case 0: {
                                if (unknownFields != null)
                                {
                                    this.UnknownFields = unknownFields.Build();
                                }
                                return(this);
                            }

                            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);
                                break;
                            }

                            case 10: {
                                Number = input.ReadString();
                                break;
                            }

                            case 16: {
                                int rawValue = input.ReadEnum();
                                if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType), rawValue))
                                {
                                    if (unknownFields == null)
                                    {
                                        unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                                    }
                                    unknownFields.MergeVarintField(2, (ulong)rawValue);
                                }
                                else
                                {
                                    Type = (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType)rawValue;
                                }
                                break;
                            }
                            }
                        }
                    }
        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(_protoErrorResFieldNames, field_name, global::System.StringComparer.Ordinal);
                    if (field_ordinal >= 0)
                    {
                        tag = _protoErrorResFieldTags[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 8: {
                    object unknown;
                    if (input.ReadEnum(ref result.payloadType_, out unknown))
                    {
                        result.hasPayloadType = true;
                    }
                    else if (unknown is int)
                    {
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                    }
                    break;
                }

                case 18: {
                    result.hasErrorCode = input.ReadString(ref result.errorCode_);
                    break;
                }

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

                case 32: {
                    result.hasMaintenanceEndTimestamp = input.ReadUInt64(ref result.maintenanceEndTimestamp_);
                    break;
                }
                }
            }

            if (unknownFields != null)
            {
                this.UnknownFields = unknownFields.Build();
            }
            return(this);
        }
コード例 #4
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(_regularDataFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _regularDataFieldTags[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 8: {
                        result.hasTerminalId = input.ReadInt64(ref result.terminalId_);
                        break;
                    }

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

                    case 24: {
                        result.hasLastModifyDate = input.ReadInt64(ref result.lastModifyDate_);
                        break;
                    }

                    case 34: {
                        global::AeroCloud.Protocol.AreaSpeeding.Builder subBuilder = global::AeroCloud.Protocol.AreaSpeeding.CreateBuilder();
                        if (result.hasSpeeding)
                        {
                            subBuilder.MergeFrom(Speeding);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        Speeding = subBuilder.BuildPartial();
                        break;
                    }

                    case 42: {
                        global::AeroCloud.Protocol.InOutArea.Builder subBuilder = global::AeroCloud.Protocol.InOutArea.CreateBuilder();
                        if (result.hasInOutArea)
                        {
                            subBuilder.MergeFrom(InOutArea);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        InOutArea = subBuilder.BuildPartial();
                        break;
                    }

                    case 50: {
                        global::AeroCloud.Protocol.RouteDriverTime.Builder subBuilder = global::AeroCloud.Protocol.RouteDriverTime.CreateBuilder();
                        if (result.hasDriverTime)
                        {
                            subBuilder.MergeFrom(DriverTime);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        DriverTime = subBuilder.BuildPartial();
                        break;
                    }

                    case 58: {
                        global::AeroCloud.Protocol.DriverNotCard.Builder subBuilder = global::AeroCloud.Protocol.DriverNotCard.CreateBuilder();
                        if (result.hasDriverNotCard)
                        {
                            subBuilder.MergeFrom(DriverNotCard);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        DriverNotCard = subBuilder.BuildPartial();
                        break;
                    }

                    case 66: {
                        global::AeroCloud.Protocol.DoorOpenOutArea.Builder subBuilder = global::AeroCloud.Protocol.DoorOpenOutArea.CreateBuilder();
                        if (result.hasDoorOpenOutArea)
                        {
                            subBuilder.MergeFrom(DoorOpenOutArea);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        DoorOpenOutArea = subBuilder.BuildPartial();
                        break;
                    }

                    case 74: {
                        global::AeroCloud.Protocol.DrivingBan.Builder subBuilder = global::AeroCloud.Protocol.DrivingBan.CreateBuilder();
                        if (result.hasDrivingBan)
                        {
                            subBuilder.MergeFrom(DrivingBan);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        DrivingBan = subBuilder.BuildPartial();
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #5
0
ファイル: LaidianCommand.cs プロジェクト: iwz73/Laidian_TCP
            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(_laidianCommandModelFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _laidianCommandModelFieldTags[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 8: {
                        object unknown;
                        if (input.ReadEnum(ref result.messageType_, out unknown))
                        {
                            result.hasMessageType = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 18: {
                        global::google.protobuf.Any.Builder subBuilder = global::google.protobuf.Any.CreateBuilder();
                        if (result.hasLaidianData)
                        {
                            subBuilder.MergeFrom(LaidianData);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        LaidianData = subBuilder.BuildPartial();
                        break;
                    }

                    case 24: {
                        result.hasResult = input.ReadInt32(ref result.result_);
                        break;
                    }

                    case 34: {
                        result.hasMessage = input.ReadString(ref result.message_);
                        break;
                    }

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

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #6
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(_agentIdentityFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _agentIdentityFieldTags[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.hasAccountGUID = input.ReadString(ref result.accountGUID_);
                        break;
                    }

                    case 18: {
                        result.hasAppGUID = input.ReadString(ref result.appGUID_);
                        break;
                    }

                    case 26: {
                        result.hasClusterGUID = input.ReadString(ref result.clusterGUID_);
                        break;
                    }

                    case 34: {
                        result.hasTierGUID = input.ReadString(ref result.tierGUID_);
                        break;
                    }

                    case 42: {
                        result.hasNodeGUID = input.ReadString(ref result.nodeGUID_);
                        break;
                    }

                    case 50: {
                        result.hasAgentGUID = input.ReadString(ref result.agentGUID_);
                        break;
                    }

                    case 56: {
                        result.hasAccountID = input.ReadUInt32(ref result.accountID_);
                        break;
                    }

                    case 64: {
                        result.hasAppID = input.ReadUInt32(ref result.appID_);
                        break;
                    }

                    case 72: {
                        result.hasClusterID = input.ReadUInt32(ref result.clusterID_);
                        break;
                    }

                    case 80: {
                        result.hasTierID = input.ReadUInt32(ref result.tierID_);
                        break;
                    }

                    case 88: {
                        result.hasNodeID = input.ReadUInt32(ref result.nodeID_);
                        break;
                    }

                    case 96: {
                        result.hasAgentID = input.ReadUInt32(ref result.agentID_);
                        break;
                    }

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

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #7
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(_areaSpeedingFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _areaSpeedingFieldTags[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 8: {
                        result.hasAreaId = input.ReadInt64(ref result.areaId_);
                        break;
                    }

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

                    case 24: {
                        result.hasRouteId = input.ReadInt64(ref result.routeId_);
                        break;
                    }

                    case 32: {
                        result.hasMaxSpeed = input.ReadInt32(ref result.maxSpeed_);
                        break;
                    }

                    case 40: {
                        result.hasContinuousTime = input.ReadInt32(ref result.continuousTime_);
                        break;
                    }

                    case 48: {
                        result.hasBasedTime = input.ReadBool(ref result.basedTime_);
                        break;
                    }

                    case 56: {
                        result.hasIsEveryDay = input.ReadBool(ref result.isEveryDay_);
                        break;
                    }

                    case 64: {
                        result.hasStartDate = input.ReadInt64(ref result.startDate_);
                        break;
                    }

                    case 72: {
                        result.hasEndDate = input.ReadInt64(ref result.endDate_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #8
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(_taskFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _taskFieldTags[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 8: {
                        result.hasId = input.ReadUInt64(ref result.id_);
                        break;
                    }

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

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

                    case 34: {
                        global::atwork_pb_msgs.TransportationTask.Builder subBuilder = global::atwork_pb_msgs.TransportationTask.CreateBuilder();
                        if (result.hasTransportationTask)
                        {
                            subBuilder.MergeFrom(TransportationTask);
                        }
                        input.ReadMessage(subBuilder, extensionRegistry);
                        TransportationTask = subBuilder.BuildPartial();
                        break;
                    }

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

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #9
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(_getAcctPropListReplyFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _getAcctPropListReplyFieldTags[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 8: {
                        object unknown;
                        if (input.ReadEnum(ref result.resultCode_, out unknown))
                        {
                            result.hasResultCode = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 18: {
                        input.ReadMessageArray(tag, field_name, result.propList_, global::FrameWork.GetAcctPropListReply.Types.AcctProp.DefaultInstance, extensionRegistry);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #10
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(_upRevisionFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _upRevisionFieldTags[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 8: {
                        object unknown;
                        if (input.ReadEnum(ref result.value_, out unknown))
                        {
                            result.hasValue = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 18:
                    case 16: {
                        scg::ICollection <object> unknownItems;
                        input.ReadEnumArray <global::Google.ProtocolBuffers.TestProtos.UpRevision.Types.Enum>(tag, field_name, result.values_, out unknownItems);
                        if (unknownItems != null)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            foreach (object rawValue in unknownItems)
                            {
                                if (rawValue is int)
                                {
                                    unknownFields.MergeVarintField(2, (ulong)(int)rawValue);
                                }
                            }
                        }
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #11
0
ファイル: LMDBConfig.cs プロジェクト: waqashaneef/NosDB
            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(_lMDBConfigFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _lMDBConfigFieldTags[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 8: {
                        object unknown;
                        if (input.ReadEnum(ref result.environmentOpenFlags_, out unknown))
                        {
                            result.hasEnvironmentOpenFlags = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 16: {
                        result.hasMaxReaders = input.ReadInt32(ref result.maxReaders_);
                        break;
                    }

                    case 24: {
                        result.hasMaxTables = input.ReadInt32(ref result.maxTables_);
                        break;
                    }

                    case 32: {
                        result.hasInitialDatabaseSize = input.ReadInt64(ref result.initialDatabaseSize_);
                        break;
                    }

                    case 40: {
                        result.hasExpansionRatio = input.ReadInt64(ref result.expansionRatio_);
                        break;
                    }

                    case 48: {
                        result.hasCurrentDatabaseSize = input.ReadInt64(ref result.currentDatabaseSize_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #12
0
ファイル: MessageHeader.cs プロジェクト: imdongchen/CySim
            public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry)
            {
                pb::UnknownFieldSet.Builder unknownFields = null;
                while (true)
                {
                    uint tag = input.ReadTag();
                    switch (tag)
                    {
                    case 0: {
                        if (unknownFields != null)
                        {
                            this.UnknownFields = unknownFields.Build();
                        }
                        return(this);
                    }

                    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);
                        break;
                    }

                    case 10: {
                        SourceObject = input.ReadBytes();
                        break;
                    }

                    case 18: {
                        DestinationObject = input.ReadBytes();
                        break;
                    }

                    case 24: {
                        SourcePort = input.ReadUInt32();
                        break;
                    }

                    case 32: {
                        DestinationPort = input.ReadUInt32();
                        break;
                    }

                    case 56: {
                        Id = input.ReadInt64();
                        break;
                    }

                    case 64: {
                        ReplyId = input.ReadInt64();
                        break;
                    }

                    case 12290: {
                        SourceSpace = input.ReadBytes();
                        break;
                    }

                    case 12298: {
                        DestinationSpace = input.ReadBytes();
                        break;
                    }

                    case 14336: {
                        int rawValue = input.ReadEnum();
                        if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus), rawValue))
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1792, (ulong)rawValue);
                        }
                        else
                        {
                            ReturnStatus = (global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus)rawValue;
                        }
                        break;
                    }
                    }
                }
            }
コード例 #13
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(_defeatMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
                    if (field_ordinal >= 0)
                    {
                        tag = _defeatMessageFieldTags[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 8: {
                    object unknown;
                    if (input.ReadEnum(ref result.type_, out unknown))
                    {
                        result.hasType = true;
                    }
                    else if (unknown is int)
                    {
                        if (unknownFields == null)
                        {
                            unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                    }
                    break;
                }

                case 18: {
                    global::CallMessage.Builder subBuilder = global::CallMessage.CreateBuilder();
                    if (result.hasCallMessage)
                    {
                        subBuilder.MergeFrom(CallMessage);
                    }
                    input.ReadMessage(subBuilder, extensionRegistry);
                    CallMessage = subBuilder.BuildPartial();
                    break;
                }

                case 26: {
                    global::BackMessage.Builder subBuilder = global::BackMessage.CreateBuilder();
                    if (result.hasBackMessage)
                    {
                        subBuilder.MergeFrom(BackMessage);
                    }
                    input.ReadMessage(subBuilder, extensionRegistry);
                    BackMessage = subBuilder.BuildPartial();
                    break;
                }
                }
            }

            if (unknownFields != null)
            {
                this.UnknownFields = unknownFields.Build();
            }
            return(this);
        }
コード例 #14
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(_robotStatusFieldNames, field_name, global::System.StringComparer.Ordinal);
                        if (field_ordinal >= 0)
                        {
                            tag = _robotStatusFieldTags[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 8: {
                        object unknown;
                        if (input.ReadEnum(ref result.capability_, out unknown))
                        {
                            result.hasCapability = true;
                        }
                        else if (unknown is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)(int)unknown);
                        }
                        break;
                    }

                    case 18: {
                        result.hasFunctionality = input.ReadString(ref result.functionality_);
                        break;
                    }

                    case 26: {
                        result.hasMetaData = input.ReadString(ref result.metaData_);
                        break;
                    }
                    }
                }

                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
コード例 #15
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);
            }