Ejemplo n.º 1
0
 public void MergeFrom(Config other)
 {
     if (other == null)
     {
         return;
     }
     user_.Add(other.user_);
     if (other.default_ != null)
     {
         if (default_ == null)
         {
             Default = new global::V2Ray.Core.Proxy.Vmess.Inbound.DefaultConfig();
         }
         Default.MergeFrom(other.Default);
     }
     if (other.detour_ != null)
     {
         if (detour_ == null)
         {
             Detour = new global::V2Ray.Core.Proxy.Vmess.Inbound.DetourConfig();
         }
         Detour.MergeFrom(other.Detour);
     }
     if (other.SecureEncryptionOnly != false)
     {
         SecureEncryptionOnly = other.SecureEncryptionOnly;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo 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 10: {
                    user_.AddEntriesFrom(input, _repeated_user_codec);
                    break;
                }

                case 18: {
                    if (default_ == null)
                    {
                        Default = new global::V2Ray.Core.Proxy.Vmess.Inbound.DefaultConfig();
                    }
                    input.ReadMessage(Default);
                    break;
                }

                case 26: {
                    if (detour_ == null)
                    {
                        Detour = new global::V2Ray.Core.Proxy.Vmess.Inbound.DetourConfig();
                    }
                    input.ReadMessage(Detour);
                    break;
                }

                case 32: {
                    SecureEncryptionOnly = input.ReadBool();
                    break;
                }
                }
            }
        }