Exemplo n.º 1
0
        private string GetPersistedMacHash()
        {
            object property = persistentStorage.GetProperty("mac.info.provider.version");

            if (property == null || !(property is string) || string.IsNullOrEmpty((string)property))
            {
                legacyApi.SetSharedMachineId(default(Guid));
                return(null);
            }
            property = persistentStorage.GetProperty(MACInformationProvider.MacAddressKey);
            if (property != null && property is string)
            {
                string text = (string)property;
                if (Regex.IsMatch(text, MACInformationProvider.PersistRegex))
                {
                    return(text);
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        private string CalculateMACAddressHash()
        {
            object property = persistentStorage.GetProperty(MacAddressKey);

            if (property != null && property is string)
            {
                string text = (string)property;
                if (Regex.IsMatch(text, PersistRegex))
                {
                    OnMACAddressHashCalculationCompletedEvent(EventArgs.Empty);
                    return(text);
                }
            }
            needToRunProcess = true;
            return(ZeroHash);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Get persisted shared property by name.
 /// </summary>
 /// <param name="propertyName"></param>
 /// <returns>null if no shared property with such name.</returns>
 public dynamic GetPersistedSharedProperty(string propertyName)
 {
     return(persistentSharedProperties.GetProperty(propertyName));
 }