public void Can_register_valid_license_from_EnvironmentVariable()
        {
            var licenseKeyText = Environment.GetEnvironmentVariable("SERVICESTACK_LICENSE");

            Licensing.RegisterLicense(licenseKeyText);
            Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));
        }
        public void Can_register_valid_licenses()
        {
            Licensing.RegisterLicense(TestBusiness2013Text);
            Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));

            Licensing.RegisterLicense(TestIndie2013Text);
            Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));
        }
Beispiel #3
0
        public void Can_register_valid_license()
        {
#if !SL5
            Licensing.RegisterLicense(new ServiceStack.Configuration.AppSettings().GetString("servicestack:license"));
#else
            Licensing.RegisterLicense("1001-e1JlZjoxMDAxLE5hbWU6VGVzdCBCdXNpbmVzcyxUeXBlOkJ1c2luZXNzLEhhc2g6UHVNTVRPclhvT2ZIbjQ5MG5LZE1mUTd5RUMzQnBucTFEbTE3TDczVEF4QUNMT1FhNXJMOWkzVjFGL2ZkVTE3Q2pDNENqTkQyUktRWmhvUVBhYTBiekJGUUZ3ZE5aZHFDYm9hL3lydGlwUHI5K1JsaTBYbzNsUC85cjVJNHE5QVhldDN6QkE4aTlvdldrdTgyTk1relY2eis2dFFqTThYN2lmc0JveHgycFdjPSxFeHBpcnk6MjAxMy0wMS0wMX0=");
#endif
            Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));
        }
        protected void Application_Start()
        {
            ServiceStackHelper.Help();
            LicenseUtils.ActivatedLicenseFeatures();

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            "ActivatedLicenseFeatures: {0}".Print(LicenseUtils.ActivatedLicenseFeatures());

            Console.ReadLine();


            //new IntegrationTest(Dialect.Sqlite).Can_insert_update_and_select_AllTypes();

            Console.ReadLine();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            var licenseKey = Environment.GetEnvironmentVariable("SERVICESTACK_LICENSE");

            if (licenseKey.IsNullOrEmpty())
            {
                throw new ArgumentNullException("SERVICESTACK_LICENSE", "Add Environment variable for SERVICESTACK_LICENSE");
            }

            Licensing.RegisterLicense(licenseKey);
            "ActivatedLicenseFeatures: ".Print(LicenseUtils.ActivatedLicenseFeatures());

            Console.ReadLine();
        }
        protected void Application_Start()
        {
            Licensing.RegisterLicenseFromFileIfExists(@"C:\src\appsettings.license.txt");

            if (!LicenseUtils.ActivatedLicenseFeatures().HasFlag(LicenseFeature.All))
            {
                throw new ConfigurationErrorsException("A valid license key is required for this demo");
            }

            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);

            new AppHost().Init();
        }
        public void Can_register_Text_License()
        {
            Licensing.RegisterLicense(TestText2013Text);

            var licensedFeatures = LicenseUtils.ActivatedLicenseFeatures();

            Assert.That(licensedFeatures, Is.EqualTo(LicenseFeature.Text));

            Assert.Throws <LicenseException>(() =>
                                             LicenseUtils.ApprovedUsage(LicenseFeature.None, LicenseFeature.Text, 1, 2, "Failed"));

            Assert.Throws <LicenseException>(() =>
                                             LicenseUtils.ApprovedUsage(LicenseFeature.OrmLite, LicenseFeature.Text, 1, 2, "Failed"));

            LicenseUtils.ApprovedUsage(LicenseFeature.Text, LicenseFeature.Text, 1, 2, "Failed");
        }
 public void Can_register_valid_license()
 {
     LicenseHelper.RegisterLicense();
     Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));
 }
 public void Can_register_valid_trial_license()
 {
     Licensing.RegisterLicense(TestTrial2016Text);
     Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.All));
 }
 public void Can_register_valid_license()
 {
     Licensing.RegisterLicense(new AppSettings().GetString("servicestack:license"));
     Assert.That(LicenseUtils.ActivatedLicenseFeatures(), Is.EqualTo(LicenseFeature.Business));
 }