Пример #1
0
 public ServerNodeController(
     ServerNodeModel model)
     : this(
         Locator.Current.GetService <IBroadcastService>())
 {
     _model = model;
 }
Пример #2
0
        private ServerNodeModel CreateServerNode(RedisServerInfo serverInfo)
        {
            string address;

            if (serverInfo.EndPoint is DnsEndPoint dns)
            {
                address = $"{dns.Host}:{dns.Port}";
            }
            else
            {
                address = serverInfo.EndPoint.ToString();
            }

            var node = new ServerNodeModel
            {
                Address    = address,
                ServerInfo = serverInfo
            };

            return(node);
        }