コード例 #1
0
ファイル: Api.cs プロジェクト: thotang/Bigtable-dotnet
 public void MergeFrom(Api other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     methods_.Add(other.methods_);
     options_.Add(other.options_);
     if (other.Version.Length != 0)
     {
         Version = other.Version;
     }
     if (other.sourceContext_ != null)
     {
         if (sourceContext_ == null)
         {
             sourceContext_ = new global::Google.Protobuf.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
 }
コード例 #2
0
ファイル: Api.cs プロジェクト: thotang/Bigtable-dotnet
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

                case 18: {
                    methods_.AddEntriesFrom(input, _repeated_methods_codec);
                    break;
                }

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

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

                case 42: {
                    if (sourceContext_ == null)
                    {
                        sourceContext_ = new global::Google.Protobuf.SourceContext();
                    }
                    input.ReadMessage(sourceContext_);
                    break;
                }
                }
            }
        }
コード例 #3
0
ファイル: Type.cs プロジェクト: thotang/Bigtable-dotnet
 public void MergeFrom(Enum other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     enumvalue_.Add(other.enumvalue_);
     options_.Add(other.options_);
     if (other.sourceContext_ != null)
     {
         if (sourceContext_ == null)
         {
             sourceContext_ = new global::Google.Protobuf.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
 }
コード例 #4
0
ファイル: Type.cs プロジェクト: thotang/Bigtable-dotnet
 public void MergeFrom(Type other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     fields_.Add(other.fields_);
     oneofs_.Add(other.oneofs_);
     options_.Add(other.options_);
     if (other.sourceContext_ != null)
     {
         if (sourceContext_ == null)
         {
             sourceContext_ = new global::Google.Protobuf.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
 }