public override ShowMessageFromWXReq.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>(ShowMessageFromWXReq._showMessageFromWXReqFieldNames, str, StringComparer.Ordinal); if (index >= 0) { num = ShowMessageFromWXReq._showMessageFromWXReqFieldTags[index]; } else { this.ParseUnknownField(input, extensionRegistry, num, str); continue; } } switch (num) { case 0: throw InvalidProtocolBufferException.InvalidTag(); case 10: { BaseReqP.Builder builder = BaseReqP.CreateBuilder(); if (this.result.hasBase) { builder.MergeFrom(this.Base); } input.ReadMessage(builder, extensionRegistry); this.Base = builder.BuildPartial(); continue; } case 0x12: { WXMessageP.Builder builder2 = WXMessageP.CreateBuilder(); if (this.result.hasMsg) { builder2.MergeFrom(this.Msg); } input.ReadMessage(builder2, extensionRegistry); this.Msg = builder2.BuildPartial(); continue; } } if (WireFormat.IsEndGroupTag(num)) { return(this); } this.ParseUnknownField(input, extensionRegistry, num, str); } return(this); }
public override ShowMessageFromWXReq.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry) { this.PrepareBuilder(); uint num; string text; while (input.ReadTag(out num, out text)) { if (num == 0u && text != null) { int num2 = Array.BinarySearch <string>(ShowMessageFromWXReq._showMessageFromWXReqFieldNames, text, StringComparer.Ordinal); if (num2 < 0) { this.ParseUnknownField(input, extensionRegistry, num, text); continue; } num = ShowMessageFromWXReq._showMessageFromWXReqFieldTags[num2]; } uint num3 = num; if (num3 == 0u) { throw InvalidProtocolBufferException.InvalidTag(); } if (num3 != 10u) { if (num3 != 18u) { if (WireFormat.IsEndGroupTag(num)) { return(this); } this.ParseUnknownField(input, extensionRegistry, num, text); } else { WXMessageP.Builder builder = WXMessageP.CreateBuilder(); if (this.result.hasMsg) { builder.MergeFrom(this.Msg); } input.ReadMessage(builder, extensionRegistry); this.Msg = builder.BuildPartial(); } } else { BaseReqP.Builder builder2 = BaseReqP.CreateBuilder(); if (this.result.hasBase) { builder2.MergeFrom(this.Base); } input.ReadMessage(builder2, extensionRegistry); this.Base = builder2.BuildPartial(); } } return(this); }
public GetMessageFromWXResp.Builder MergeMsg(WXMessageP value) { ThrowHelper.ThrowIfNull(value, "value"); this.PrepareBuilder(); if (this.result.hasMsg && (this.result.msg_ != WXMessageP.DefaultInstance)) { this.result.msg_ = WXMessageP.CreateBuilder(this.result.msg_).MergeFrom(value).BuildPartial(); } else { this.result.msg_ = value; } this.result.hasMsg = true; return(this); }