예제 #1
0
 public SnsActionGroup.Builder SetReferAction(SnsAction.Builder builderForValue)
 {
     ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     this.PrepareBuilder();
     this.result.hasReferAction = true;
     this.result.referAction_   = builderForValue.Build();
     return(this);
 }
예제 #2
0
            public override SnsActionGroup.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>(SnsActionGroup._snsActionGroupFieldNames, str, StringComparer.Ordinal);
                        if (index >= 0)
                        {
                            num = SnsActionGroup._snsActionGroupFieldTags[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.hasParentId = input.ReadUInt64(ref this.result.parentId_);
                        continue;
                    }

                    case 0x1a:
                    {
                        SnsAction.Builder builder = SnsAction.CreateBuilder();
                        if (this.result.hasCurrentAction)
                        {
                            builder.MergeFrom(this.CurrentAction);
                        }
                        input.ReadMessage(builder, extensionRegistry);
                        this.CurrentAction = builder.BuildPartial();
                        continue;
                    }

                    case 0x22:
                    {
                        SnsAction.Builder builder2 = SnsAction.CreateBuilder();
                        if (this.result.hasReferAction)
                        {
                            builder2.MergeFrom(this.ReferAction);
                        }
                        input.ReadMessage(builder2, extensionRegistry);
                        this.ReferAction = builder2.BuildPartial();
                        continue;
                    }
                    }
                    if (WireFormat.IsEndGroupTag(num))
                    {
                        return(this);
                    }
                    this.ParseUnknownField(input, extensionRegistry, num, str);
                }
                return(this);
            }