ResolveToEndPoint() public static méthode

public static ResolveToEndPoint ( string value ) : IPEndPoint
value string
Résultat System.Net.IPEndPoint
Exemple #1
0
        public static EndPoint ResolveToEndPoint(string location)
        {
            if (string.IsNullOrWhiteSpace(location))
            {
                throw new ArgumentNullException(nameof(location), "The location is required");
            }

            var uri = new Uri((location.Contains("://") ? "" : "memcached://") + location);

            return(ConfigurationHelper.ResolveToEndPoint(uri.Host, uri.Port));
        }
 /// <summary>
 /// Adds a new server to the pool.
 /// </summary>
 /// <param name="address">The host name or IP address of the server.</param>
 /// <param name="port">The port number of the memcached instance.</param>
 public void AddServer(string address, int port)
 => this.Servers.Add(ConfigurationHelper.ResolveToEndPoint(address, port));
Exemple #3
0
 /// <summary>
 /// Adds a new server to the pool.
 /// </summary>
 /// <param name="address">The host name or IP address of the server.</param>
 /// <param name="port">The port number of the memcached instance.</param>
 public void AddServer(string host, int port)
 {
     this.Servers.Add(ConfigurationHelper.ResolveToEndPoint(host, port));
 }
Exemple #4
0
 /// <summary>
 /// Adds a new server to the pool.
 /// </summary>
 /// <param name="address">The address and the port of the server in the format 'host:port'.</param>
 public void AddServer(string address)
 {
     this.Servers.Add(ConfigurationHelper.ResolveToEndPoint(address));
 }