Esempio n. 1
0
        public void MergeFrom(Chance other)
        {
            if (other == null)
            {
                return;
            }
            if (other.display_ != null)
            {
                if (display_ == null)
                {
                    Display = new global::Monopoly.Protobuf.ChanceDisplay();
                }
                Display.MergeFrom(other.Display);
            }
            switch (other.ExtraCase)
            {
            case ExtraOneofCase.Unspecified:
                Unspecified = other.Unspecified;
                break;

            case ExtraOneofCase.MoveToTile:
                if (MoveToTile == null)
                {
                    MoveToTile = new global::Monopoly.Protobuf.MoveToTileExtra();
                }
                MoveToTile.MergeFrom(other.MoveToTile);
                break;

            case ExtraOneofCase.MoneyExchange:
                if (MoneyExchange == null)
                {
                    MoneyExchange = new global::Monopoly.Protobuf.MoneyExchangeExtra();
                }
                MoneyExchange.MergeFrom(other.MoneyExchange);
                break;

            case ExtraOneofCase.MoveSteps:
                if (MoveSteps == null)
                {
                    MoveSteps = new global::Monopoly.Protobuf.MoveStepsExtra();
                }
                MoveSteps.MergeFrom(other.MoveSteps);
                break;

            case ExtraOneofCase.Collectible:
                if (Collectible == null)
                {
                    Collectible = new global::Monopoly.Protobuf.CollectibleExtra();
                }
                Collectible.MergeFrom(other.Collectible);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Esempio n. 2
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;
                }
                }
            }
        }
Esempio n. 3
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
        }