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); }
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); }
/// <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)); }