Beispiel #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: {
                    E164Number = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Type.PhoneNumber.Types.ShortCode subBuilder = new global::Google.Type.PhoneNumber.Types.ShortCode();
                    if (kindCase_ == KindOneofCase.ShortCode)
                    {
                        subBuilder.MergeFrom(ShortCode);
                    }
                    input.ReadMessage(subBuilder);
                    ShortCode = subBuilder;
                    break;
                }

                case 26: {
                    Extension = input.ReadString();
                    break;
                }
                }
            }
        }
Beispiel #2
0
        public void MergeFrom(PhoneNumber other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Extension.Length != 0)
            {
                Extension = other.Extension;
            }
            switch (other.KindCase)
            {
            case KindOneofCase.E164Number:
                E164Number = other.E164Number;
                break;

            case KindOneofCase.ShortCode:
                if (ShortCode == null)
                {
                    ShortCode = new global::Google.Type.PhoneNumber.Types.ShortCode();
                }
                ShortCode.MergeFrom(other.ShortCode);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #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: {
                    E164Number = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Type.PhoneNumber.Types.ShortCode subBuilder = new global::Google.Type.PhoneNumber.Types.ShortCode();
                    if (kindCase_ == KindOneofCase.ShortCode)
                    {
                        subBuilder.MergeFrom(ShortCode);
                    }
                    input.ReadMessage(subBuilder);
                    ShortCode = subBuilder;
                    break;
                }

                case 26: {
                    Extension = input.ReadString();
                    break;
                }
                }
            }
    #endif
        }