예제 #1
0
            public override SnsObjectOp.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>(SnsObjectOp._snsObjectOpFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsObjectOp._snsObjectOpFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        this.result.hasId = input.ReadUInt64(ref this.result.id_);
                        continue;
                    }

                    case 0x10:
                    {
                        this.result.hasOpType = input.ReadUInt32(ref this.result.opType_);
                        continue;
                    }

                    case 0x1a:
                    {
                        SKBuiltinBuffer_t.Builder builder = SKBuiltinBuffer_t.CreateBuilder();
                        if (this.result.hasExt)
                        {
                            builder.MergeFrom(this.Ext);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.Ext = builder.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        return(this);
                    }
                    this.ParseUnknownField(input, extensionRegistry, num, str);
                }
                return(this);
            }
예제 #2
0
            public override SnsUserInfo.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>(SnsUserInfo._snsUserInfoFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsUserInfo._snsUserInfoFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        this.result.hasSnsFlag = input.ReadUInt32(ref this.result.snsFlag_);
                        continue;
                    }

                    case 0x12:
                    {
                        this.result.hasSnsBGImgID = input.ReadString(ref this.result.snsBGImgID_);
                        continue;
                    }

                    case 0x18:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasSnsBGObjectID = input.ReadUInt64(ref this.result.snsBGObjectID_);
                }
                return(this);
            }
예제 #3
0
            /// <summary>
            /// Parse a single field from <paramref name="input"/> and merge it
            /// into this set.
            /// </summary>
            /// <param name="tag">The field's tag number, which was already parsed.</param>
            /// <param name="input">The coded input stream containing the field</param>
            /// <returns>false if the tag is an "end group" tag, true otherwise</returns>
            public bool MergeFieldFrom(uint tag, ICodedInputStream input)
            {
                if (tag == 0)
                {
                    input.SkipField();
                    return(true);
                }

                int number = WireFormat.GetTagFieldNumber(tag);

                switch (WireFormat.GetTagWireType(tag))
                {
                case WireFormat.WireType.Varint:
                {
                    ulong uint64 = 0;
                    if (input.ReadUInt64(ref uint64))
                    {
                        GetFieldBuilder(number).AddVarint(uint64);
                    }
                    return(true);
                }

                case WireFormat.WireType.Fixed32:
                {
                    uint uint32 = 0;
                    if (input.ReadFixed32(ref uint32))
                    {
                        GetFieldBuilder(number).AddFixed32(uint32);
                    }
                    return(true);
                }

                case WireFormat.WireType.Fixed64:
                {
                    ulong uint64 = 0;
                    if (input.ReadFixed64(ref uint64))
                    {
                        GetFieldBuilder(number).AddFixed64(uint64);
                    }
                    return(true);
                }

                case WireFormat.WireType.LengthDelimited:
                {
                    ByteString bytes = null;
                    if (input.ReadBytes(ref bytes))
                    {
                        GetFieldBuilder(number).AddLengthDelimited(bytes);
                    }
                    return(true);
                }

                case WireFormat.WireType.StartGroup:
                {
                    Builder subBuilder = CreateBuilder();
#pragma warning disable 0612
                    input.ReadUnknownGroup(number, subBuilder);
#pragma warning restore 0612
                    GetFieldBuilder(number).AddGroup(subBuilder.Build());
                    return(true);
                }

                case WireFormat.WireType.EndGroup:
                    return(false);

                default:
                    throw InvalidProtocolBufferException.InvalidWireType();
                }
            }
예제 #4
0
            public override objectDeployable.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder unknownFields = null;
                while (input.ReadTag(out num, out str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(objectDeployable._objectDeployableFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = objectDeployable._objectDeployableFieldTags[index];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        this.result.hasCreatorID = input.ReadUInt64(ref this.result.creatorID_);
                        continue;
                    }

                    case 0x10:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasOwnerID = input.ReadUInt64(ref this.result.ownerID_);
                }
                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
예제 #5
0
            public override SnsTimeLineRequest.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>(SnsTimeLineRequest._snsTimeLineRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsTimeLineRequest._snsTimeLineRequestFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        micromsg.BaseRequest.Builder builder = micromsg.BaseRequest.CreateBuilder();
                        if (this.result.hasBaseRequest)
                        {
                            builder.MergeFrom(this.BaseRequest);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.BaseRequest = builder.BuildPartial();
                        continue;
                    }

                    case 0x12:
                    {
                        this.result.hasFirstPageMd5 = input.ReadString(ref this.result.firstPageMd5_);
                        continue;
                    }

                    case 0x18:
                    {
                        this.result.hasMaxId = input.ReadUInt64(ref this.result.maxId_);
                        continue;
                    }

                    case 0x20:
                    {
                        this.result.hasMinFilterId = input.ReadUInt64(ref this.result.minFilterId_);
                        continue;
                    }

                    case 40:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasLastRequestTime = input.ReadUInt32(ref this.result.lastRequestTime_);
                }
                return(this);
            }
            // Token: 0x0600154D RID: 5453 RVA: 0x0004802C File Offset: 0x0004622C
            public override AwayEvent.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                uint   num;
                string text;

                while (input.ReadTag(ref num, ref text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(AwayEvent._awayEventFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = AwayEvent._awayEventFieldTags[num2];
                    }
                    uint num3 = num;
                    if (num3 == 0u)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    object obj;
                    if (num3 != 8u)
                    {
                        if (num3 != 16u)
                        {
                            if (num3 != 24u)
                            {
                                if (WireFormat.IsEndGroupTag(num))
                                {
                                    if (builder != null)
                                    {
                                        this.UnknownFields = builder.Build();
                                    }
                                    return(this);
                                }
                                if (builder == null)
                                {
                                    builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                                }
                                this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            }
                            else
                            {
                                this.result.hasInstigator = input.ReadUInt64(ref this.result.instigator_);
                            }
                        }
                        else
                        {
                            this.result.hasTimestamp = input.ReadInt32(ref this.result.timestamp_);
                        }
                    }
                    else if (input.ReadEnum <AwayEvent.Types.AwayEventType>(ref this.result.type_, ref obj))
                    {
                        this.result.hasType = true;
                    }
                    else if (obj is int)
                    {
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        builder.MergeVarintField(1, (ulong)((long)((int)obj)));
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
예제 #7
0
파일: User.cs 프로젝트: Virobeast2/RCLIENT
            public override RustProto.User.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder unknownFields = null;
                while (input.ReadTag(out num, out str))
                {
                    object obj2;
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(RustProto.User._userFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = RustProto.User._userFieldTags[index];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        this.result.hasUserid = input.ReadUInt64(ref this.result.userid_);
                        continue;
                    }

                    case 0x12:
                    {
                        this.result.hasDisplayname = input.ReadString(ref this.result.displayname_);
                        continue;
                    }

                    case 0x18:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    if (input.ReadEnum <RustProto.User.Types.UserGroup>(ref this.result.usergroup_, out obj2))
                    {
                        this.result.hasUsergroup = true;
                    }
                    else
                    {
                        if (!(obj2 is int))
                        {
                            continue;
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        unknownFields.MergeVarintField(3, (ulong)((int)obj2));
                    }
                }
                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
예제 #8
0
            public override objectStructMaster.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(ref num, ref str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(objectStructMaster._objectStructMasterFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = objectStructMaster._objectStructMasterFieldTags[index];
                        }
                        else
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0x15:
                    {
                        this.result.hasDecayDelay = input.ReadFloat(ref this.result.decayDelay_);
                        continue;
                    }

                    case 0x18:
                    {
                        this.result.hasCreatorID = input.ReadUInt64(ref this.result.creatorID_);
                        continue;
                    }

                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                        break;

                    case 0x20:
                        goto Label_0148;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (builder != null)
                            {
                                this.set_UnknownFields(builder.Build());
                            }
                            return(this);
                        }
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.get_UnknownFields());
                        }
                        this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasID = input.ReadInt32(ref this.result.iD_);
                    continue;
Label_0148:
                    this.result.hasOwnerID = input.ReadUInt64(ref this.result.ownerID_);
                }
                if (builder != null)
                {
                    this.set_UnknownFields(builder.Build());
                }
                return(this);
            }
예제 #9
0
            public override objectStructMaster.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;
                uint   num1;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
Label1:
                while (input.ReadTag(out num, out str))
                {
                    if (num == 0 && str != null)
                    {
                        int num2 = Array.BinarySearch <string>(objectStructMaster._objectStructMasterFieldNames, str, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                        else
                        {
                            num = objectStructMaster._objectStructMasterFieldTags[num2];
                        }
                    }
                    num1 = num;
                    switch (num1)
                    {
                    case 21:
                    {
                        this.result.hasDecayDelay = input.ReadFloat(ref this.result.decayDelay_);
                        continue;
                    }

                    case 24:
                    {
                        this.result.hasCreatorID = input.ReadUInt64(ref this.result.creatorID_);
                        continue;
                    }

                    default:
                    {
                        if (num1 == 0)
                        {
                            break;
                        }
                        else
                        {
                            goto Label0;
                        }
                    }
                    }
                    throw InvalidProtocolBufferException.InvalidTag();
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);

                if (num1 == 8)
                {
                    this.result.hasID = input.ReadInt32(ref this.result.iD_);
                    goto Label1;
                }
                else if (num1 == 32)
                {
                    this.result.hasOwnerID = input.ReadUInt64(ref this.result.ownerID_);
                    goto Label1;
                }
                else
                {
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        if (builder != null)
                        {
                            this.UnknownFields = builder.Build();
                        }
                        return(this);
                    }
                    if (builder == null)
                    {
                        builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                    }
                    this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                    goto Label1;
                }
            }
예제 #10
0
            public override AwayEvent.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder unknownFields = null;
                while (input.ReadTag(out num, out str))
                {
                    if ((num == 0) && (str != null))
                    {
                        int index = Array.BinarySearch <string>(AwayEvent._awayEventFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = AwayEvent._awayEventFieldTags[index];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        object obj2;
                        if (input.ReadEnum <AwayEvent.Types.AwayEventType>(ref this.result.type_, out obj2))
                        {
                            this.result.hasType = true;
                        }
                        else if (obj2 is int)
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            unknownFields.MergeVarintField(1, (ulong)((int)obj2));
                        }
                        continue;
                    }

                    case 0x10:
                    {
                        this.result.hasTimestamp = input.ReadInt32(ref this.result.timestamp_);
                        continue;
                    }

                    case 0x18:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, unknownFields, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasInstigator = input.ReadUInt64(ref this.result.instigator_);
                }
                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
예제 #11
0
            public override UploadVoiceRequest.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>(UploadVoiceRequest._uploadVoiceRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = UploadVoiceRequest._uploadVoiceRequestFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0x12:
                    {
                        this.result.hasToUserName = input.ReadString(ref this.result.toUserName_);
                        continue;
                    }

                    case 0x18:
                    {
                        this.result.hasOffset = input.ReadUInt32(ref this.result.offset_);
                        continue;
                    }

                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                    {
                        this.result.hasFromUserName = input.ReadString(ref this.result.fromUserName_);
                        continue;
                    }

                    case 0x20:
                    {
                        this.result.hasLength = input.ReadUInt32(ref this.result.length_);
                        continue;
                    }

                    case 0x2a:
                    {
                        this.result.hasClientMsgId = input.ReadString(ref this.result.clientMsgId_);
                        continue;
                    }

                    case 0x30:
                    {
                        this.result.hasMsgId = input.ReadUInt32(ref this.result.msgId_);
                        continue;
                    }

                    case 0x38:
                    {
                        this.result.hasVoiceLength = input.ReadUInt32(ref this.result.voiceLength_);
                        continue;
                    }

                    case 0x42:
                    {
                        SKBuiltinBuffer_t.Builder builder = SKBuiltinBuffer_t.CreateBuilder();
                        if (this.result.hasData)
                        {
                            builder.MergeFrom(this.Data);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.Data = builder.BuildPartial();
                        continue;
                    }

                    case 0x58:
                    {
                        this.result.hasCancelFlag = input.ReadUInt32(ref this.result.cancelFlag_);
                        continue;
                    }

                    case 0x62:
                    {
                        this.result.hasMsgSource = input.ReadString(ref this.result.msgSource_);
                        continue;
                    }

                    case 0x68:
                    {
                        this.result.hasVoiceFormat = input.ReadUInt32(ref this.result.voiceFormat_);
                        continue;
                    }

                    case 0x48:
                    {
                        this.result.hasEndFlag = input.ReadUInt32(ref this.result.endFlag_);
                        continue;
                    }

                    case 0x52:
                    {
                        BaseRequest.Builder builder2 = BaseRequest.CreateBuilder();
                        if (this.result.hasBaseRequest)
                        {
                            builder2.MergeFrom(this.BaseRequest);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.BaseRequest = builder2.BuildPartial();
                        continue;
                    }

                    case 0x70:
                    {
                        this.result.hasUICreateTime = input.ReadUInt32(ref this.result.uICreateTime_);
                        continue;
                    }

                    case 120:
                    {
                        this.result.hasForwardFlag = input.ReadUInt32(ref this.result.forwardFlag_);
                        continue;
                    }

                    case 0x80:
                    {
                        this.result.hasNewMsgId = input.ReadUInt64(ref this.result.newMsgId_);
                        continue;
                    }

                    case 0x88:
                    {
                        this.result.hasReqTime = input.ReadUInt32(ref this.result.reqTime_);
                        continue;
                    }

                    case 0x92:
                    {
                        SKBuiltinBuffer_t.Builder builder3 = SKBuiltinBuffer_t.CreateBuilder();
                        if (this.result.hasVoiceId)
                        {
                            builder3.MergeFrom(this.VoiceId);
                        }
                        input.ReadMessage(builder3, extensionRegistry);
                        this.VoiceId = builder3.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        return(this);
                    }
                    this.ParseUnknownField(input, extensionRegistry, num, str);
                }
                return(this);
            }
예제 #12
0
            public override UploadVideoResponse.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>(UploadVideoResponse._uploadVideoResponseFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = UploadVideoResponse._uploadVideoResponseFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

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

                    case 0x12:
                    {
                        this.result.hasClientMsgId = input.ReadString(ref this.result.clientMsgId_);
                        continue;
                    }

                    case 0x18:
                    {
                        this.result.hasMsgId = input.ReadUInt32(ref this.result.msgId_);
                        continue;
                    }

                    case 0x20:
                    {
                        this.result.hasThumbStartPos = input.ReadUInt32(ref this.result.thumbStartPos_);
                        continue;
                    }

                    case 40:
                    {
                        this.result.hasVideoStartPos = input.ReadUInt32(ref this.result.videoStartPos_);
                        continue;
                    }

                    case 0x30:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasNewMsgId = input.ReadUInt64(ref this.result.newMsgId_);
                }
                return(this);
            }
예제 #13
0
            public override MicroMsgResponseNew.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>(MicroMsgResponseNew._microMsgResponseNewFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = MicroMsgResponseNew._microMsgResponseNewFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0x12:
                    {
                        SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
                        if (this.result.hasToUserName)
                        {
                            builder.MergeFrom(this.ToUserName);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.ToUserName = builder.BuildPartial();
                        continue;
                    }

                    case 0x18:
                    {
                        this.result.hasMsgId = input.ReadUInt32(ref this.result.msgId_);
                        continue;
                    }

                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 8:
                    {
                        this.result.hasRet = input.ReadInt32(ref this.result.ret_);
                        continue;
                    }

                    case 0x20:
                    {
                        this.result.hasClientMsgId = input.ReadUInt32(ref this.result.clientMsgId_);
                        continue;
                    }

                    case 40:
                    {
                        this.result.hasCreateTime = input.ReadUInt32(ref this.result.createTime_);
                        continue;
                    }

                    case 0x30:
                    {
                        this.result.hasServerTime = input.ReadUInt32(ref this.result.serverTime_);
                        continue;
                    }

                    case 0x38:
                    {
                        this.result.hasType = input.ReadUInt32(ref this.result.type_);
                        continue;
                    }

                    case 0x40:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasNewMsgId = input.ReadUInt64(ref this.result.newMsgId_);
                }
                return(this);
            }
예제 #14
0
            // Token: 0x06001453 RID: 5203 RVA: 0x000460B0 File Offset: 0x000442B0
            public override objectStructMaster.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                uint   num;
                string text;

                while (input.ReadTag(ref num, ref text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(objectStructMaster._objectStructMasterFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = objectStructMaster._objectStructMasterFieldTags[num2];
                    }
                    uint num3 = num;
                    switch (num3)
                    {
                    case 21u:
                        this.result.hasDecayDelay = input.ReadFloat(ref this.result.decayDelay_);
                        break;

                    default:
                        if (num3 == 0u)
                        {
                            throw InvalidProtocolBufferException.InvalidTag();
                        }
                        if (num3 != 8u)
                        {
                            if (num3 != 32u)
                            {
                                if (WireFormat.IsEndGroupTag(num))
                                {
                                    if (builder != null)
                                    {
                                        this.UnknownFields = builder.Build();
                                    }
                                    return(this);
                                }
                                if (builder == null)
                                {
                                    builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                                }
                                this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            }
                            else
                            {
                                this.result.hasOwnerID = input.ReadUInt64(ref this.result.ownerID_);
                            }
                        }
                        else
                        {
                            this.result.hasID = input.ReadInt32(ref this.result.iD_);
                        }
                        break;

                    case 24u:
                        this.result.hasCreatorID = input.ReadUInt64(ref this.result.creatorID_);
                        break;
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
예제 #15
0
파일: User.cs 프로젝트: sknchan/LegacyRust
            public override RustProto.User.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;
                object obj;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(out num, out str))
                {
                    if (num == 0 && str != null)
                    {
                        int num1 = Array.BinarySearch <string>(RustProto.User._userFieldNames, str, StringComparer.Ordinal);
                        if (num1 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                        else
                        {
                            num = RustProto.User._userFieldTags[num1];
                        }
                    }
                    uint num2 = num;
                    if (num2 == 0)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num2 == 8)
                    {
                        this.result.hasUserid = input.ReadUInt64(ref this.result.userid_);
                    }
                    else if (num2 == 18)
                    {
                        this.result.hasDisplayname = input.ReadString(ref this.result.displayname_);
                    }
                    else if (num2 != 24)
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (builder != null)
                            {
                                this.UnknownFields = builder.Build();
                            }
                            return(this);
                        }
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                    }
                    else if (input.ReadEnum <RustProto.User.Types.UserGroup>(ref this.result.usergroup_, out obj))
                    {
                        this.result.hasUsergroup = true;
                    }
                    else if (obj is int)
                    {
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        builder.MergeVarintField(3, (ulong)((int)obj));
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
예제 #16
0
            public override objectDeployable.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                uint   num;
                string str;

                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                while (input.ReadTag(out num, out str))
                {
                    if (num == 0 && str != null)
                    {
                        int num1 = Array.BinarySearch <string>(objectDeployable._objectDeployableFieldNames, str, StringComparer.Ordinal);
                        if (num1 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                            continue;
                        }
                        else
                        {
                            num = objectDeployable._objectDeployableFieldTags[num1];
                        }
                    }
                    uint num2 = num;
                    if (num2 == 0)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num2 == 8)
                    {
                        this.result.hasCreatorID = input.ReadUInt64(ref this.result.creatorID_);
                    }
                    else if (num2 == 16)
                    {
                        this.result.hasOwnerID = input.ReadUInt64(ref this.result.ownerID_);
                    }
                    else
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            if (builder != null)
                            {
                                this.UnknownFields = builder.Build();
                            }
                            return(this);
                        }
                        if (builder == null)
                        {
                            builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, builder, extensionRegistry, num, str);
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
예제 #17
0
            /// <summary>
            /// Parse a single field from <paramref name="input"/> and merge it
            /// into this set.
            /// </summary>
            /// <param name="tag">The field's tag number, which was already parsed.</param>
            /// <param name="input">The coded input stream containing the field</param>
            /// <returns>false if the tag is an "end group" tag, true otherwise</returns>
            public bool MergeFieldFrom(uint tag, ICodedInputStream input)
            {
                if (tag == 0)
                {
                    input.SkipField();
                    return true;
                }

                int number = WireFormat.GetTagFieldNumber(tag);
                switch (WireFormat.GetTagWireType(tag))
                {
                    case WireFormat.WireType.Varint:
                        {
                            ulong uint64 = 0;
                            if (input.ReadUInt64(ref uint64))
                            {
                                GetFieldBuilder(number).AddVarint(uint64);
                            }
                            return true;
                        }
                    case WireFormat.WireType.Fixed32:
                        {
                            uint uint32 = 0;
                            if (input.ReadFixed32(ref uint32))
                            {
                                GetFieldBuilder(number).AddFixed32(uint32);
                            }
                            return true;
                        }
                    case WireFormat.WireType.Fixed64:
                        {
                            ulong uint64 = 0;
                            if (input.ReadFixed64(ref uint64))
                            {
                                GetFieldBuilder(number).AddFixed64(uint64);
                            }
                            return true;
                        }
                    case WireFormat.WireType.LengthDelimited:
                        {
                            ByteString bytes = null;
                            if (input.ReadBytes(ref bytes))
                            {
                                GetFieldBuilder(number).AddLengthDelimited(bytes);
                            }
                            return true;
                        }
                    case WireFormat.WireType.StartGroup:
                        {
                            Builder subBuilder = CreateBuilder();
#pragma warning disable 0612
                            input.ReadUnknownGroup(number, subBuilder);
#pragma warning restore 0612
                            GetFieldBuilder(number).AddGroup(subBuilder.Build());
                            return true;
                        }
                    case WireFormat.WireType.EndGroup:
                        return false;
                    default:
                        throw InvalidProtocolBufferException.InvalidWireType();
                }
            }