示例#1
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                    break;

                case 10: {
                    if (display_ == null)
                    {
                        Display = new global::Monopoly.Protobuf.ChanceDisplay();
                    }
                    input.ReadMessage(Display);
                    break;
                }

                case 16: {
                    Unspecified = input.ReadBool();
                    break;
                }

                case 26: {
                    global::Monopoly.Protobuf.MoveToTileExtra subBuilder = new global::Monopoly.Protobuf.MoveToTileExtra();
                    if (extraCase_ == ExtraOneofCase.MoveToTile)
                    {
                        subBuilder.MergeFrom(MoveToTile);
                    }
                    input.ReadMessage(subBuilder);
                    MoveToTile = subBuilder;
                    break;
                }

                case 34: {
                    global::Monopoly.Protobuf.MoneyExchangeExtra subBuilder = new global::Monopoly.Protobuf.MoneyExchangeExtra();
                    if (extraCase_ == ExtraOneofCase.MoneyExchange)
                    {
                        subBuilder.MergeFrom(MoneyExchange);
                    }
                    input.ReadMessage(subBuilder);
                    MoneyExchange = subBuilder;
                    break;
                }

                case 42: {
                    global::Monopoly.Protobuf.MoveStepsExtra subBuilder = new global::Monopoly.Protobuf.MoveStepsExtra();
                    if (extraCase_ == ExtraOneofCase.MoveSteps)
                    {
                        subBuilder.MergeFrom(MoveSteps);
                    }
                    input.ReadMessage(subBuilder);
                    MoveSteps = subBuilder;
                    break;
                }

                case 50: {
                    global::Monopoly.Protobuf.CollectibleExtra subBuilder = new global::Monopoly.Protobuf.CollectibleExtra();
                    if (extraCase_ == ExtraOneofCase.Collectible)
                    {
                        subBuilder.MergeFrom(Collectible);
                    }
                    input.ReadMessage(subBuilder);
                    Collectible = subBuilder;
                    break;
                }
                }
            }
        }
示例#2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (display_ == null)
                    {
                        Display = new global::Monopoly.Protobuf.ChanceDisplay();
                    }
                    input.ReadMessage(Display);
                    break;
                }

                case 16: {
                    Unspecified = input.ReadBool();
                    break;
                }

                case 26: {
                    global::Monopoly.Protobuf.MoveToTileExtra subBuilder = new global::Monopoly.Protobuf.MoveToTileExtra();
                    if (extraCase_ == ExtraOneofCase.MoveToTile)
                    {
                        subBuilder.MergeFrom(MoveToTile);
                    }
                    input.ReadMessage(subBuilder);
                    MoveToTile = subBuilder;
                    break;
                }

                case 34: {
                    global::Monopoly.Protobuf.MoneyExchangeExtra subBuilder = new global::Monopoly.Protobuf.MoneyExchangeExtra();
                    if (extraCase_ == ExtraOneofCase.MoneyExchange)
                    {
                        subBuilder.MergeFrom(MoneyExchange);
                    }
                    input.ReadMessage(subBuilder);
                    MoneyExchange = subBuilder;
                    break;
                }

                case 42: {
                    global::Monopoly.Protobuf.MoveStepsExtra subBuilder = new global::Monopoly.Protobuf.MoveStepsExtra();
                    if (extraCase_ == ExtraOneofCase.MoveSteps)
                    {
                        subBuilder.MergeFrom(MoveSteps);
                    }
                    input.ReadMessage(subBuilder);
                    MoveSteps = subBuilder;
                    break;
                }

                case 50: {
                    global::Monopoly.Protobuf.CollectibleExtra subBuilder = new global::Monopoly.Protobuf.CollectibleExtra();
                    if (extraCase_ == ExtraOneofCase.Collectible)
                    {
                        subBuilder.MergeFrom(Collectible);
                    }
                    input.ReadMessage(subBuilder);
                    Collectible = subBuilder;
                    break;
                }
                }
            }
    #endif
        }