예제 #1
0
파일: Api.cs 프로젝트: TinyZzh/G-WuLin
        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.WellKnownTypes.SourceContext();
                    }
                    input.ReadMessage(sourceContext_);
                    break;
                }

                case 50:
                {
                    mixins_.AddEntriesFrom(input, _repeated_mixins_codec);
                    break;
                }

                case 56:
                {
                    syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax)input.ReadEnum();
                    break;
                }
                }
            }
        }
예제 #2
0
 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.WellKnownTypes.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
     mixins_.Add(other.mixins_);
     if (other.Syntax != 0)
     {
         Syntax = other.Syntax;
     }
 }
예제 #3
0
 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.WellKnownTypes.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
     if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2)
     {
         Syntax = other.Syntax;
     }
 }
예제 #4
0
파일: Api.cs 프로젝트: maple-yang/protobuf
 public void MergeFrom(Api other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     methods_.MergeFrom(other.methods_);
     options_.MergeFrom(other.options_);
     if (other.Version.Length != 0)
     {
         Version = other.Version;
     }
     if (other.sourceContext_ != null)
     {
         if (sourceContext_ == null)
         {
             SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
     mixins_.MergeFrom(other.mixins_);
     if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2)
     {
         Syntax = other.Syntax;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #5
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: {
                    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.WellKnownTypes.SourceContext();
                    }
                    input.ReadMessage(SourceContext);
                    break;
                }

                case 50: {
                    mixins_.AddEntriesFrom(input, _repeated_mixins_codec);
                    break;
                }

                case 56: {
                    Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax)input.ReadEnum();
                    break;
                }
                }
            }
    #endif
        }
예제 #6
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    if (!pb::UnknownFieldSet.MergeFieldFrom(ref _unknownFields, input))
                    {
                        return;
                    }
                    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.WellKnownTypes.SourceContext();
                    }
                    input.ReadMessage(SourceContext);
                    break;
                }

                case 50: {
                    mixins_.AddEntriesFrom(input, _repeated_mixins_codec);
                    break;
                }

                case 56: {
                    Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax)input.ReadEnum();
                    break;
                }
                }
            }
        }
예제 #7
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: {
                    Name = input.ReadString();
                    break;
                }

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

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

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

                case 42: {
                    if (sourceContext_ == null)
                    {
                        SourceContext = new global::Google.Protobuf.WellKnownTypes.SourceContext();
                    }
                    input.ReadMessage(SourceContext);
                    break;
                }

                case 50: {
                    mixins_.AddEntriesFrom(ref input, _repeated_mixins_codec);
                    break;
                }

                case 56: {
                    Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax)input.ReadEnum();
                    break;
                }
                }
            }
        }
예제 #8
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 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.WellKnownTypes.SourceContext();
                    }
                    input.ReadMessage(sourceContext_);
                    break;
                }
                }
            }
        }
예제 #9
0
 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.WellKnownTypes.SourceContext();
         }
         SourceContext.MergeFrom(other.SourceContext);
     }
 }