Exemple #1
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 8: {
                    kind_     = input.ReadEnum();
                    kindCase_ = KindOneofCase.NullValue;
                    break;
                }

                case 17: {
                    NumberValue = input.ReadDouble();
                    break;
                }

                case 26: {
                    StringValue = input.ReadString();
                    break;
                }

                case 32: {
                    BoolValue = input.ReadBool();
                    break;
                }

                case 42: {
                    global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
                    if (kindCase_ == KindOneofCase.StructValue)
                    {
                        subBuilder.MergeFrom(StructValue);
                    }
                    input.ReadMessage(subBuilder);
                    StructValue = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    if (kindCase_ == KindOneofCase.ListValue)
                    {
                        subBuilder.MergeFrom(ListValue);
                    }
                    input.ReadMessage(subBuilder);
                    ListValue = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    kind_     = input.ReadEnum();
                    kindCase_ = KindOneofCase.NullValue;
                    break;
                }

                case 17: {
                    NumberValue = input.ReadDouble();
                    break;
                }

                case 26: {
                    StringValue = input.ReadString();
                    break;
                }

                case 32: {
                    BoolValue = input.ReadBool();
                    break;
                }

                case 42: {
                    global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
                    if (kindCase_ == KindOneofCase.StructValue)
                    {
                        subBuilder.MergeFrom(StructValue);
                    }
                    input.ReadMessage(subBuilder);
                    StructValue = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    if (kindCase_ == KindOneofCase.ListValue)
                    {
                        subBuilder.MergeFrom(ListValue);
                    }
                    input.ReadMessage(subBuilder);
                    ListValue = subBuilder;
                    break;
                }
                }
            }
        }
Exemple #3
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 8: {
                    kind_     = input.ReadEnum();
                    kindCase_ = KindOneofCase.NullValue;
                    break;
                }

                case 17: {
                    NumberValue = input.ReadDouble();
                    break;
                }

                case 26: {
                    StringValue = input.ReadString();
                    break;
                }

                case 32: {
                    BoolValue = input.ReadBool();
                    break;
                }

                case 42: {
                    global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
                    if (kindCase_ == KindOneofCase.StructValue)
                    {
                        subBuilder.MergeFrom(StructValue);
                    }
                    input.ReadMessage(subBuilder);
                    StructValue = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    if (kindCase_ == KindOneofCase.ListValue)
                    {
                        subBuilder.MergeFrom(ListValue);
                    }
                    input.ReadMessage(subBuilder);
                    ListValue = subBuilder;
                    break;
                }
                }
            }
        }
Exemple #4
0
 public void ClearKind()
 {
     kindCase_ = KindOneofCase.None;
     kind_     = null;
 }
Exemple #5
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while (input.ReadTag(out tag))
            {
                switch (tag)
                {
                case 0:
                    throw pb::InvalidProtocolBufferException.InvalidTag();

                default:
                    if (pb::WireFormat.IsEndGroupTag(tag))
                    {
                        return;
                    }
                    break;

                case 8: {
                    kind_     = input.ReadEnum();
                    kindCase_ = KindOneofCase.NullValue;
                    break;
                }

                case 17: {
                    NumberValue = input.ReadDouble();
                    break;
                }

                case 26: {
                    StringValue = input.ReadString();
                    break;
                }

                case 32: {
                    BoolValue = input.ReadBool();
                    break;
                }

                case 42: {
                    global::Google.Protobuf.WellKnownTypes.Struct subBuilder = new global::Google.Protobuf.WellKnownTypes.Struct();
                    if (kindCase_ == KindOneofCase.StructValue)
                    {
                        subBuilder.MergeFrom(StructValue);
                    }
                    input.ReadMessage(subBuilder);
                    StructValue = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.ListValue subBuilder = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    if (kindCase_ == KindOneofCase.ListValue)
                    {
                        subBuilder.MergeFrom(ListValue);
                    }
                    input.ReadMessage(subBuilder);
                    ListValue = subBuilder;
                    break;
                }
                }
            }
        }