예제 #1
0
 public NewSyncResponse.Builder SetCmdList(CmdList value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     this.result.hasCmdList = true;
     this.result.cmdList_   = value;
     return(this);
 }
예제 #2
0
 public NewSyncRequest.Builder SetOplog(CmdList value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     this.result.hasOplog = true;
     this.result.oplog_   = value;
     return(this);
 }
예제 #3
0
 public NewSyncResponse.Builder MergeCmdList(CmdList value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     if (this.result.hasCmdList && (this.result.cmdList_ != CmdList.DefaultInstance))
     {
         this.result.cmdList_ = CmdList.CreateBuilder(this.result.cmdList_).MergeFrom(value).BuildPartial();
     }
     else
     {
         this.result.cmdList_ = value;
     }
     this.result.hasCmdList = true;
     return(this);
 }
예제 #4
0
 public NewSyncRequest.Builder MergeOplog(CmdList value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     if (this.result.hasOplog && (this.result.oplog_ != CmdList.DefaultInstance))
     {
         this.result.oplog_ = CmdList.CreateBuilder(this.result.oplog_).MergeFrom(value).BuildPartial();
     }
     else
     {
         this.result.oplog_ = value;
     }
     this.result.hasOplog = true;
     return(this);
 }
예제 #5
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);
            }
예제 #6
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);
            }