private string ApiEndpointUrl(string userAgent) { var apiLicenceKey = _sitecoreSettingsWrapper.GetSetting("Sitecore.FiftyOneDegrees.CloudDeviceDetection.ApiLicenceKey"); var apiEndpointUrl = _sitecoreSettingsWrapper.GetSetting("Sitecore.FiftyOneDegrees.CloudDeviceDetection.ApiEndpoint"); return(string.Format(apiEndpointUrl, apiLicenceKey, HttpUtility.UrlEncode(userAgent))); }
private string GetDeviceIdWithNameFallback(string settingName, string deviceName) { var defaultDeviceId = _sitecoreSettingsWrapper.GetSetting(settingName); if (string.IsNullOrEmpty(defaultDeviceId)) { defaultDeviceId = GetDeviceIdByName(deviceName); } return(defaultDeviceId); }