/// <summary> /// It is called by the constructor at the end of the license validation process if a proper license file can be opened. /// By default it traces the information about the license to the <see cref="LicenseTraceSource"/> as verbose message. /// If implemented by the derived class the current license can be used to get more information from it. /// </summary> /// <param name="license">The current license for temporal use. The current license is disposed just after returning from this method /// </param> /// <remarks> /// Because the current license is disposed in the base class just after returning from this method, it must not be /// assigned locally to keep it for future use. To keep it for future use the derived class must make a local copy. /// </remarks> protected virtual void TraceCurrentLicense(LicenseFile license) { string format = "Obtained valid license for {0}, runtime={1}, volume={2}"; string msg = string.Format(format, typeof(type).FullName, license.RunTimeConstrain, license.VolumeConstrain); LicenseTraceSource.TraceVerbose(0, msg); }
internal static void InstallLicense(string user, string company, string email, bool loadLicenseFromDefaultContainer, string alternativeProductName, string licenseUnlockCode, Assembly assembly) { if (assembly == null) { throw new ArgumentNullException(nameof(assembly), $"Entring {nameof(InstallLicense)} with null argument."); } LicenseTraceSource.TraceVerbose(39, $"Entering InstallLicense {user}, {company}, {email}"); ManifestManagement.WriteDeployManifest(assembly, alternativeProductName); LicenseFile.Install(user, company, email, FileNames.LicenseFilePath, loadLicenseFromDefaultContainer, licenseUnlockCode); }