/// <summary> /// Prompts the users if their trial license has expired /// </summary> public static void PromptUserForLicenseIfTrialHasExpired() { if (instance == null) { instance = new LicenseManager(); } instance.PromptUserForLicenseIfTrialHasExpiredInternal(); }
public void Init() { if (!NServiceBus.Configure.Instance.Configurer.HasComponent<LicenseManager>()) { var licenseManager = new LicenseManager(); NServiceBus.Configure.Instance.Configurer.RegisterSingleton<LicenseManager>(licenseManager); } }
public void Invoke(ReceivePhysicalMessageContext context, Action next) { context.PhysicalMessage.Headers[Headers.HasLicenseExpired] = LicenseExpired.ToString().ToLower(); next(); if (Debugger.IsAttached) { if (LicenseManager.HasLicenseExpired()) { Log.Error("Your license has expired"); } } }
public void Init() { var expiredLicense = true; try { LicenseManager.InitializeLicense(); expiredLicense = LicenseManager.HasLicenseExpired(); } catch (Exception ex) { //we only log here to prevent licensing issue to abort startup and cause production outages Logger.Fatal("Failed to initialize the license", ex); } Configure.Component <LicenseBehavior>(DependencyLifecycle.InstancePerCall) .ConfigureProperty(p => p.LicenseExpired, expiredLicense); }
/// <summary> /// Initializes the licensing system with the given license /// </summary> /// <param name="licenseText"></param> public static void Parse(string licenseText) { instance = new LicenseManager(licenseText); }
/// <summary> /// Prompts the users if their trial license has expired /// </summary> public static void PromptUserForLicenseIfTrialHasExpired() { if (instance == null) instance = new LicenseManager(); instance.PromptUserForLicenseIfTrialHasExpiredInternal(); }
/// <summary> /// Initializes the licensing system with the given license /// </summary> /// <param name="licenseText"></param> public static void Parse(string licenseText) { instance = new LicenseManager(licenseText); }