示例#1
0
        /// <summary>
        /// Determines whether [is network card in registry] [the specified card].
        /// </summary>
        /// <param name="card">The card.</param>
        /// <returns>
        ///   <c>true</c> if [is network card in registry] [the specified card]; otherwise, <c>false</c>.
        /// </returns>
        internal static Boolean IsNetworkCardInRegistry(WindowsNetworkCard card)
        {
            if (String.IsNullOrEmpty(card.Id))
            {
                return(false);
            }

            string sKey = @"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\" + card.Id;

            return(RegistryUtility.Exists(RegistryKeyType.LocalMachine, sKey));
        }
示例#2
0
 public bool WasEverInTrial() => registryUtility.Exists() &&
 !string.IsNullOrWhiteSpace(registryUtility.ReadKey(keyName));
示例#3
0
 public bool WasEverInTrial() => registryUtility.Exists(registryName);