コード例 #1
0
ファイル: IPExtensions.cs プロジェクト: sonofsatoshi2020/xds
        /// <summary>
        ///     This method determines if any of a list of network end points can be mapped to this whitebind endpoint.
        /// </summary>
        public static bool CanBeMappedTo(this IPEndPoint whiteBindEndpoint, List <IPEndPoint> networkEndpoints,
                                         out IPEndPoint localEndpoint)
        {
            localEndpoint = networkEndpoints.SingleOrDefault(ep => whiteBindEndpoint.Contains(ep));

            return(localEndpoint != null);
        }