Ejemplo n.º 1
0
        public void MergeFrom(Value other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.KindCase)
            {
            case KindOneofCase.NullValue:
                NullValue = other.NullValue;
                break;

            case KindOneofCase.NumberValue:
                NumberValue = other.NumberValue;
                break;

            case KindOneofCase.StringValue:
                StringValue = other.StringValue;
                break;

            case KindOneofCase.BoolValue:
                BoolValue = other.BoolValue;
                break;

            case KindOneofCase.StructValue:
                if (StructValue == null)
                {
                    StructValue = new global::Google.Protobuf.WellKnownTypes.Struct();
                }
                StructValue.MergeFrom(other.StructValue);
                break;

            case KindOneofCase.ListValue:
                if (ListValue == null)
                {
                    ListValue = new global::Google.Protobuf.WellKnownTypes.ListValue();
                }
                ListValue.MergeFrom(other.ListValue);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }