public static IEnumerable <IPEndPoint> ToEndpoints(this IEnumerable <string> endpoints)
 {
     foreach (string endpoint1 in endpoints)
     {
         IPEndPoint endpoint2;
         if (IPEndPointExtensions.TryParse(endpoint1, out endpoint2))
         {
             yield return(endpoint2);
         }
     }
 }
 public static bool TryParse(string endpointString, out IPEndPoint endpoint)
 {
     endpoint = IPEndPointExtensions.InternalParse(endpointString, true);
     return(endpoint != null);
 }
 public static IPEndPoint Parse(string endpointString)
 {
     return(IPEndPointExtensions.InternalParse(endpointString, false));
 }