Exemplo n.º 1
0
        public void MergeFrom(TransactionOptions other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.ModeCase)
            {
            case ModeOneofCase.ReadOnly:
                if (ReadOnly == null)
                {
                    ReadOnly = new global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadOnly();
                }
                ReadOnly.MergeFrom(other.ReadOnly);
                break;

            case ModeOneofCase.ReadWrite:
                if (ReadWrite == null)
                {
                    ReadWrite = new global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadWrite();
                }
                ReadWrite.MergeFrom(other.ReadWrite);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 18: {
                    global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadOnly subBuilder = new global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadOnly();
                    if (modeCase_ == ModeOneofCase.ReadOnly)
                    {
                        subBuilder.MergeFrom(ReadOnly);
                    }
                    input.ReadMessage(subBuilder);
                    ReadOnly = subBuilder;
                    break;
                }

                case 26: {
                    global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadWrite subBuilder = new global::Google.Cloud.Firestore.V1.TransactionOptions.Types.ReadWrite();
                    if (modeCase_ == ModeOneofCase.ReadWrite)
                    {
                        subBuilder.MergeFrom(ReadWrite);
                    }
                    input.ReadMessage(subBuilder);
                    ReadWrite = subBuilder;
                    break;
                }
                }
            }
        }