public static async void CallHome(RestClient client, string hubServerUrl, string hubVersion) { try { //Updat timeout for phone home client.Timeout = 5000; var getRegistrationResponse = Registration.GetRegistration(client); var regId = getRegistrationResponse.Data.registrationId; if (regId == null) { regId = MD5Hash(hubServerUrl); } switch (hubVersion) { case "14.0": hubVersion = "2015"; break; case "15.0": hubVersion = "2017"; break; default: hubVersion = "Unknown"; break; } Classes.PhoneHome.RootObject phoneHome = new Classes.PhoneHome.RootObject(); phoneHome.regId = regId; phoneHome.source = "Integrations"; Classes.PhoneHome.InfoMap infoMap = new Classes.PhoneHome.InfoMap(); infoMap.blackDuckName = "Hub"; infoMap.blackDuckVersion = HubVersion.GetHubVersionNumberString(client); infoMap.thirdPartyName = "Visual-Studio"; infoMap.thirdPartyVersion = hubVersion; infoMap.pluginVersion = Assembly.GetExecutingAssembly().GetName().Version.Major.ToString() + "." + Assembly.GetExecutingAssembly().GetName().Version.Minor.ToString() + "." + Assembly.GetExecutingAssembly().GetName().Version.Build.ToString(); phoneHome.infoMap = infoMap; PhoneHome.SendPhoneHome(phoneHome); } catch (Exception ex) { //Do nothing } }
public static string GrabSetting(string file) { PhoneHome p = new PhoneHome(file); return(p.Call()); }
public static string GrabSetting(string file) { PhoneHome p = new PhoneHome(file); return p.Call(); }