Ejemplo n.º 1
0
        /// <summary>
        /// Prompts the users if their trial license has expired
        /// </summary>
        public static void PromptUserForLicenseIfTrialHasExpired()
        {
            if (instance == null)
            {
                instance = new LicenseManager();
            }

            instance.PromptUserForLicenseIfTrialHasExpiredInternal();
        }
Ejemplo n.º 2
0
        public void Init()
        {
            if (!NServiceBus.Configure.Instance.Configurer.HasComponent<LicenseManager>())
            {
                var licenseManager = new LicenseManager();

                NServiceBus.Configure.Instance.Configurer.RegisterSingleton<LicenseManager>(licenseManager);
            }
        }
Ejemplo n.º 3
0
        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");
                }
            }
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes the licensing system with the given license
 /// </summary>
 /// <param name="licenseText"></param>
 public static void Parse(string licenseText)
 {
     instance = new LicenseManager(licenseText);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Prompts the users if their trial license has expired
        /// </summary>
        public static void PromptUserForLicenseIfTrialHasExpired()
        {
            if (instance == null)
                instance = new LicenseManager();

            instance.PromptUserForLicenseIfTrialHasExpiredInternal();
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes the licensing system with the given license
 /// </summary>
 /// <param name="licenseText"></param>
 public static void Parse(string licenseText)
 {
     instance = new LicenseManager(licenseText);
 }