Ejemplo n.º 1
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_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind)input.ReadEnum();
                    break;
                }

                case 16: {
                    cardinality_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality)input.ReadEnum();
                    break;
                }

                case 24: {
                    Number = input.ReadInt32();
                    break;
                }

                case 34: {
                    Name = input.ReadString();
                    break;
                }

                case 50: {
                    TypeUrl = input.ReadString();
                    break;
                }

                case 56: {
                    OneofIndex = input.ReadInt32();
                    break;
                }

                case 64: {
                    Packed = input.ReadBool();
                    break;
                }

                case 74: {
                    options_.AddEntriesFrom(input, _repeated_options_codec);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind)input.ReadEnum();
                    break;
                }

                case 16: {
                    cardinality_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality)input.ReadEnum();
                    break;
                }

                case 24: {
                    Number = input.ReadInt32();
                    break;
                }

                case 34: {
                    Name = input.ReadString();
                    break;
                }

                case 50: {
                    TypeUrl = input.ReadString();
                    break;
                }

                case 56: {
                    OneofIndex = input.ReadInt32();
                    break;
                }

                case 64: {
                    Packed = input.ReadBool();
                    break;
                }

                case 74: {
                    options_.AddEntriesFrom(input, _repeated_options_codec);
                    break;
                }

                case 82: {
                    JsonName = input.ReadString();
                    break;
                }
                }
            }
        }