/// <summary>Refreshes the license file with the latest data from SOLO Server.</summary> /// <returns>Returns true if the license file was refreshed successfully. If false is returned, evaluate the <see cref="License.LastError"/> property to determine the reason why the refresh failed.</returns> public bool RefreshLicense() { //initialize the object used for calling the web service method XmlLicenseFileService ws = m_WebServiceHelper.CreateXmlLicenseFileServiceObject(); if (null == ws) { this.LastError = m_WebServiceHelper.LastError; return(false); } string licenseContent = ""; if (!base.RefreshLicense(ws, ref licenseContent)) { if (this.LastError.ExtendedErrorNumber == 5010 || this.LastError.ExtendedErrorNumber == 5015 || this.LastError.ExtendedErrorNumber == 5016 || this.LastError.ExtendedErrorNumber == 5017) { File.Delete(LicenseConfiguration.LicenseFilePath); return(true); } return(false); } //try to save the license file to the file system if (!SaveLicenseFile(licenseContent)) { return(false); } return(true); }
/// <summary>Refreshes the license file with the latest data from SOLO Server.</summary> /// <returns>Returns true if the license file was refreshed successfully. If false is returned, evaluate the <see cref="License.LastError"/> property to determine the reason why the refresh failed.</returns> internal bool RefreshLicense() { //initialize the object used for calling the web service method XmlLicenseFileService ws = m_WebServiceHelper.CreateXmlLicenseFileServiceObject(); if (null == ws) { this.LastError = m_WebServiceHelper.LastError; return(false); } string licenseContent = ""; if (!this.RefreshLicense(ws, ref licenseContent)) { if (this.LastError.ExtendedErrorNumber == 5010 || this.LastError.ExtendedErrorNumber == 5015 || this.LastError.ExtendedErrorNumber == 5016 || this.LastError.ExtendedErrorNumber == 5017) { this.CreateExpiredEvaluation(); return(true); } return(false); } //Write the updated contents of the license file and aliases. return(SaveLicenseFile(licenseContent)); }