コード例 #1
0
 public void MergeFrom(Type other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Code != global::Google.Cloud.Spanner.V1.TypeCode.Unspecified)
     {
         Code = other.Code;
     }
     if (other.arrayElementType_ != null)
     {
         if (arrayElementType_ == null)
         {
             ArrayElementType = new global::Google.Cloud.Spanner.V1.Type();
         }
         ArrayElementType.MergeFrom(other.ArrayElementType);
     }
     if (other.structType_ != null)
     {
         if (structType_ == null)
         {
             StructType = new global::Google.Cloud.Spanner.V1.StructType();
         }
         StructType.MergeFrom(other.StructType);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #2
0
ファイル: Type.cs プロジェクト: yassirusa/google-cloud-dotnet
 public void MergeFrom(Type other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Code != 0)
     {
         Code = other.Code;
     }
     if (other.arrayElementType_ != null)
     {
         if (arrayElementType_ == null)
         {
             arrayElementType_ = new global::Google.Cloud.Spanner.V1.Type();
         }
         ArrayElementType.MergeFrom(other.ArrayElementType);
     }
     if (other.structType_ != null)
     {
         if (structType_ == null)
         {
             structType_ = new global::Google.Cloud.Spanner.V1.StructType();
         }
         StructType.MergeFrom(other.StructType);
     }
 }
コード例 #3
0
        public void MergeFrom(StandardSqlDataType other)
        {
            if (other == null)
            {
                return;
            }
            if (other.TypeKind != global::Google.Cloud.Bigquery.V2.StandardSqlDataType.Types.TypeKind.Unspecified)
            {
                TypeKind = other.TypeKind;
            }
            switch (other.SubTypeCase)
            {
            case SubTypeOneofCase.ArrayElementType:
                if (ArrayElementType == null)
                {
                    ArrayElementType = new global::Google.Cloud.Bigquery.V2.StandardSqlDataType();
                }
                ArrayElementType.MergeFrom(other.ArrayElementType);
                break;

            case SubTypeOneofCase.StructType:
                if (StructType == null)
                {
                    StructType = new global::Google.Cloud.Bigquery.V2.StandardSqlStructType();
                }
                StructType.MergeFrom(other.StructType);
                break;
            }

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