public static void Main(string[] args) { LicenseManager.AddLicense("67;100-MASUIT", "809739091397182EC1ECEA8770EB4218"); RegisterAutomapper.Excute(); MyHub.Init(); CreateWebHostBuilder(args).Build().Run(); }
protected void Application_Start() { string licenseName = "60;100-KAI"; string licenseKey = "11ED9159EB11121F52FE8ABA629C07F1"; LicenseManager.AddLicense(licenseName, licenseKey); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); ModelBinders.Binders.Add(typeof(JArray), new JArrayModelBinder()); ModelBinders.Binders.Add(typeof(JObject), new JObjectModelBinder()); //Database.SetInitializer<BaseReadDbContext>(null); //Database.SetInitializer<ReadDbContext>(null); //Database.SetInitializer<WriteDbContext>(null); //using (var dbcontext = new ReadDbContext()) //{ // var objectContext = ((IObjectContextAdapter)dbcontext).ObjectContext; // var mappingCollection = (StorageMappingItemCollection)objectContext.MetadataWorkspace.GetItemCollection(DataSpace.CSSpace); // mappingCollection.GenerateViews(new List<EdmSchemaError>()); //} //using (var dbcontext = new WriteDbContext()) //{ // var objectContext = ((IObjectContextAdapter)dbcontext).ObjectContext; // var mappingCollection = (StorageMappingItemCollection)objectContext.MetadataWorkspace.GetItemCollection(DataSpace.CSSpace); // mappingCollection.GenerateViews(new List<EdmSchemaError>()); //} }
public void LicenseManager_LicenseClearCalled_ClearsLicenses() { LicenseManager.AddLicense("blub"); LicenseManager.ClearLicenses(); var emptyList = new List <string>(); Assert.AreEqual(emptyList, LicenseManager.Licenses); }
private void AddLicenses() { LicenseManager.AddLicense(LicenseHolder.ThisSoftwareLicense); LicenseManager.AddLicense(LicenseHolder.OxyPlotLicense); LicenseManager.AddLicense(LicenseHolder.NLOGLicense); LicenseManager.AddLicense(LicenseHolder.docFxLicense); LicenseManager.AddLicense(LicenseHolder.pilotHUDLicense); LicenseManager.AddLicense(LicenseHolder.MahAppsLicense); }
public void LicenseManager_LicenseAddCalled_AddsLicense() { LicenseManager.AddLicense("blub"); var testList = new List <string>(); testList.Add("blub"); Assert.AreEqual(testList, LicenseManager.Licenses); }
protected void Application_Start(object sender, EventArgs e) { LicenseManager.AddLicense("83;100-3EQWD", "96389A270C0805BB1B8D190BC2E3685D"); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); StartupConfig.Startup(); }
public Startup(IHostEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build(); ExcelPackage.LicenseContext = LicenseContext.NonCommercial; LicenseManager.AddLicense("2456;100-FPT", "3f0586d1-0216-5005-8b7a-9080b0bedb5e"); }
protected void Application_Start(object sender, EventArgs e) { LicenseManager.AddLicense("67;100-MASUIT", "809739091397182EC1ECEA8770EB4218"); System.Web.Http.GlobalConfiguration.Configure(WebApiConfig.Register); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); System.Web.Http.GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); AutofacConfig.RegisterMVC(); StartupConfig.Startup(); }
protected void Application_Start(object sender, EventArgs e) { // Z.EntityFramework 证书 LicenseManager.AddLicense("67;100-MASUIT", "809739091397182EC1ECEA8770EB4218"); // 区域注册 AreaRegistration.RegisterAllAreas(); // 过滤器注册 FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); // WebApi注册 GlobalConfiguration.Configure(WebApiConfig.Register); // 路由注册 RouteConfig.RegisterRoutes(RouteTable.Routes); // Bundles注册 //BundleConfig.RegisterBundles(BundleTable.Bundles); // 其他配置 StartupConfig.Startup(); }
protected void Application_Start(object sender, EventArgs e) { if (!string.IsNullOrEmpty(My.Config.AppSettings.LicenseName)) { LicenseManager.AddLicense(My.Config.AppSettings.LicenseName, My.Config.AppSettings.LicenseKey); } // DO a warmup call for JIT compilation using (var ctx = new CodeFirstEntities()) { ctx.EntitySimples.Add(new EntitySimple { ColumnInt = 1 }); ctx.SaveChanges(); ctx.EntitySimples.Add(new EntitySimple { ColumnInt = 1 }); ctx.BulkSaveChanges(); } }
/// <summary>Adds a PRO License to activate all features.</summary> /// <param name="licenseName">The license name.</param> /// <param name="licenseKey">The license key.</param> public static void AddLicense(string licenseName, string licenseKey) { LicenseManager.AddLicense(licenseName, licenseKey); }