Beispiel #1
0
 // Token: 0x060007A0 RID: 1952 RVA: 0x00012510 File Offset: 0x00010710
 public Builder MergeMessage(OSMessage value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     PrepareBuilder();
     if (result.HasMessage && result.message_ != OSMessage.DefaultInstance)
     {
         result.message_ = OSMessage.CreateBuilder(result.message_).MergeFrom(value).BuildPartial();
     }
     else
     {
         result.message_ = value;
     }
     result.HasMessage = true;
     return(this);
 }
Beispiel #2
0
 public StartOSBatchTask.Builder MergeMessage(OSMessage value)
 {
     ThrowHelper.ThrowIfNull(value, "value");
     this.PrepareBuilder();
     if (this.result.hasMessage && this.result.message_ != OSMessage.DefaultInstance)
     {
         this.result.message_ = OSMessage.CreateBuilder(this.result.message_).MergeFrom(value).BuildPartial();
     }
     else
     {
         this.result.message_ = value;
     }
     this.result.hasMessage = true;
     return(this);
 }
Beispiel #3
0
            public override StartOSBatchTask.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                uint   num;
                string text;

                while (input.ReadTag(out num, out text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(StartOSBatchTask._startOSBatchTaskFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = StartOSBatchTask._startOSBatchTaskFieldTags[num2];
                    }
                    if (num == 0u)
                    {
                        throw InvalidProtocolBufferException.InvalidTag();
                    }
                    if (num != 10u)
                    {
                        if (num != 16u)
                        {
                            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.hasExpire = input.ReadInt64(ref this.result.expire_);
                        }
                    }
                    else
                    {
                        OSMessage.Builder builder2 = OSMessage.CreateBuilder();
                        if (this.result.hasMessage)
                        {
                            builder2.MergeFrom(this.Message);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.Message = builder2.BuildPartial();
                    }
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
            public override PushOSSingleMessage.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder builder = null;
                uint   num;
                string text;

                while (input.ReadTag(out num, out text))
                {
                    if (num == 0u && text != null)
                    {
                        int num2 = Array.BinarySearch <string>(PushOSSingleMessage._pushOSSingleMessageFieldNames, text, StringComparer.Ordinal);
                        if (num2 < 0)
                        {
                            if (builder == null)
                            {
                                builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, builder, extensionRegistry, num, text);
                            continue;
                        }
                        num = PushOSSingleMessage._pushOSSingleMessageFieldTags[num2];
                    }
                    if (num <= 10u)
                    {
                        if (num == 0u)
                        {
                            throw InvalidProtocolBufferException.InvalidTag();
                        }
                        if (num == 10u)
                        {
                            this.result.hasSeqId = input.ReadString(ref this.result.seqId_);
                            continue;
                        }
                    }
                    else
                    {
                        if (num == 18u)
                        {
                            OSMessage.Builder builder2 = OSMessage.CreateBuilder();
                            if (this.result.hasMessage)
                            {
                                builder2.MergeFrom(this.Message);
                            }
                            input.ReadMessage(builder2, extensionRegistry);
                            this.Message = builder2.BuildPartial();
                            continue;
                        }
                        if (num == 26u)
                        {
                            Target.Builder builder3 = Target.CreateBuilder();
                            if (this.result.hasTarget)
                            {
                                builder3.MergeFrom(this.Target);
                            }
                            input.ReadMessage(builder3, extensionRegistry);
                            this.Target = builder3.BuildPartial();
                            continue;
                        }
                    }
                    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);
                }
                if (builder != null)
                {
                    this.UnknownFields = builder.Build();
                }
                return(this);
            }
Beispiel #5
0
 public PushOSSingleMessage.Builder MergeMessage(OSMessage value)
 {
     Google.ProtocolBuffers.ThrowHelper.ThrowIfNull((object)value, nameof(value));
     this.PrepareBuilder();
     this.result.message_   = !this.result.hasMessage || this.result.message_ == OSMessage.DefaultInstance ? value : OSMessage.CreateBuilder(this.result.message_).MergeFrom(value).BuildPartial();
     this.result.hasMessage = true;
     return(this);
 }
Beispiel #6
0
            public override PushOSSingleMessage.Builder MergeFrom(
                ICodedInputStream input,
                ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder unknownFields = (UnknownFieldSet.Builder)null;
                uint   fieldTag;
                string fieldName;

                while (input.ReadTag(out fieldTag, out fieldName))
                {
                    if (fieldTag == 0U && fieldName != null)
                    {
                        int index = Array.BinarySearch <string>(PushOSSingleMessage._pushOSSingleMessageFieldNames, fieldName, (IComparer <string>)StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            fieldTag = PushOSSingleMessage._pushOSSingleMessageFieldTags[index];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, unknownFields, extensionRegistry, fieldTag, fieldName);
                            continue;
                        }
                    }
                    switch (fieldTag)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                        this.result.hasSeqId = input.ReadString(ref this.result.seqId_);
                        continue;

                    case 18:
                        OSMessage.Builder builder1 = OSMessage.CreateBuilder();
                        if (this.result.hasMessage)
                        {
                            builder1.MergeFrom(this.Message);
                        }
                        input.ReadMessage((IBuilderLite)builder1, extensionRegistry);
                        this.Message = builder1.BuildPartial();
                        continue;

                    case 26:
                        Target.Builder builder2 = Target.CreateBuilder();
                        if (this.result.hasTarget)
                        {
                            builder2.MergeFrom(this.Target);
                        }
                        input.ReadMessage((IBuilderLite)builder2, extensionRegistry);
                        this.Target = builder2.BuildPartial();
                        continue;

                    default:
                        if (WireFormat.IsEndGroupTag(fieldTag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, unknownFields, extensionRegistry, fieldTag, fieldName);
                        continue;
                    }
                }
                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }
Beispiel #7
0
            public override StartOSBatchTask.Builder MergeFrom(
                ICodedInputStream input,
                ExtensionRegistry extensionRegistry)
            {
                this.PrepareBuilder();
                UnknownFieldSet.Builder unknownFields = (UnknownFieldSet.Builder)null;
                uint   fieldTag;
                string fieldName;

                while (input.ReadTag(out fieldTag, out fieldName))
                {
                    if (fieldTag == 0U && fieldName != null)
                    {
                        int index = Array.BinarySearch <string>(StartOSBatchTask._startOSBatchTaskFieldNames, fieldName, (IComparer <string>)StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            fieldTag = StartOSBatchTask._startOSBatchTaskFieldTags[index];
                        }
                        else
                        {
                            if (unknownFields == null)
                            {
                                unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            this.ParseUnknownField(input, unknownFields, extensionRegistry, fieldTag, fieldName);
                            continue;
                        }
                    }
                    switch (fieldTag)
                    {
                    case 0:
                        throw InvalidProtocolBufferException.InvalidTag();

                    case 10:
                        OSMessage.Builder builder = OSMessage.CreateBuilder();
                        if (this.result.hasMessage)
                        {
                            builder.MergeFrom(this.Message);
                        }
                        input.ReadMessage((IBuilderLite)builder, extensionRegistry);
                        this.Message = builder.BuildPartial();
                        continue;

                    case 16:
                        this.result.hasExpire = input.ReadInt64(ref this.result.expire_);
                        continue;

                    default:
                        if (WireFormat.IsEndGroupTag(fieldTag))
                        {
                            if (unknownFields != null)
                            {
                                this.UnknownFields = unknownFields.Build();
                            }
                            return(this);
                        }
                        if (unknownFields == null)
                        {
                            unknownFields = UnknownFieldSet.CreateBuilder(this.UnknownFields);
                        }
                        this.ParseUnknownField(input, unknownFields, extensionRegistry, fieldTag, fieldName);
                        continue;
                    }
                }
                if (unknownFields != null)
                {
                    this.UnknownFields = unknownFields.Build();
                }
                return(this);
            }