示例#1
0
 public NewSyncResponse.Builder SetCmdList(CmdList.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasCmdList = true;
     this.result.cmdList_   = builderForValue.Build();
     return(this);
 }
示例#2
0
 public NewSyncRequest.Builder SetOplog(CmdList.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasOplog = true;
     this.result.oplog_   = builderForValue.Build();
     return(this);
 }
示例#3
0
            public override NewSyncResponse.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>(NewSyncResponse._newSyncResponseFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = NewSyncResponse._newSyncResponseFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

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

                    case 0x12:
                    {
                        CmdList.Builder builder = CmdList.CreateBuilder();
                        if (this.result.hasCmdList)
                        {
                            builder.MergeFrom(this.CmdList);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.CmdList = builder.BuildPartial();
                        continue;
                    }

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

                    case 0x22:
                    {
                        SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
                        if (this.result.hasKeyBuf)
                        {
                            builder2.MergeFrom(this.KeyBuf);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.KeyBuf = builder2.BuildPartial();
                        continue;
                    }

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

                    case 0x30:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasOnlineVersion = input.ReadUInt32(ref this.result.onlineVersion_);
                }
                return(this);
            }
示例#4
0
            public override NewSyncRequest.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>(NewSyncRequest._newSyncRequestFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = NewSyncRequest._newSyncRequestFieldTags[index];
                        }
                        else
                        {
                            this.ParseUnknownField(input, extensionRegistry, num, str);
                            continue;
                        }
                    }
                    switch (num)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

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

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

                    case 0x1a:
                    {
                        SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
                        if (this.result.hasKeyBuf)
                        {
                            builder2.MergeFrom(this.KeyBuf);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.KeyBuf = builder2.BuildPartial();
                        continue;
                    }

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

                    case 0x2a:
                        break;

                    default:
                    {
                        if (WireFormat.IsEndGroupTag(num))
                        {
                            return(this);
                        }
                        this.ParseUnknownField(input, extensionRegistry, num, str);
                        continue;
                    }
                    }
                    this.result.hasDeviceType = input.ReadBytes(ref this.result.deviceType_); //input.ReadString(ref this.result.deviceType_);
                }
                return(this);
            }