Пример #1
0
        /// <summary>
        /// Determines whether [is on same machine] [the specified cit].
        /// </summary>
        /// <param name="cit">The cit.</param>
        /// <returns><c>true</c> if [is on same machine] [the specified cit]; otherwise, <c>false</c>.</returns>
        private bool IsOnSameMachine(SerializableEndpoint cit)
        {
            var    localIps = NetUtils.GetIPv4AssociatedWithLocalHost().Select(x => x.ToString());
            string ipIn     = NetUtils.GetFirstIp4(cit.Address.Uri.Host);
            var    res      = localIps.Contains(ipIn);

            return(res);
        }
Пример #2
0
 /// <summary>
 /// Determines whether the serialized endpoint is on the same machine or not.
 /// </summary>
 /// <param name="ep">the endpoint</param>
 /// <returns>
 ///     <c>true</c> if [is on same machine] [the specified cit]; otherwise, <c>false</c>.
 /// </returns>
 private static bool IsOnSameMachine(SerializableEndpoint ep)
 {
     return(ep.Address.Uri.AbsoluteUri.ToLower().Contains(System.Environment.MachineName.ToLower()));
 }