コード例 #1
0
 public ServerInfo(ServerIdentity identity, string name, string region, ushort httpPort, ushort httpsPort = 0)
 {
     Address    = identity.Address;
     Ports      = identity.PortsString;
     ServerRole = identity.ServerRole;
     Name       = name;
     Region     = region;
     HttpPort   = httpPort;
     HttpsPort  = httpsPort;
 }
コード例 #2
0
        public bool Equals(ServerIdentity other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            var a = Ports.All(other.Ports.Contains) && Ports.Count == other.Ports.Count;

            return(string.Equals(Address, other.Address) && a &&
                   string.Equals(PortsString, other.PortsString) && ServerRole == other.ServerRole);
        }