RegisterLicenseFromAppSettings() public static method

public static RegisterLicenseFromAppSettings ( IAppSettings appSettings ) : void
appSettings IAppSettings
return void
コード例 #1
0
        public override void OnConfigLoad()
        {
            if (app != null)
            {
                //Initialize VFS
                var env = app.ApplicationServices.GetService <IHostingEnvironment>();
                Config.WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath;

                AppHostBase.RegisterLicenseFromAppSettings(AppSettings);
            }
        }
コード例 #2
0
        public override void OnConfigLoad()
        {
            base.OnConfigLoad();
            if (app != null)
            {
                //Initialize VFS
                var env = app.ApplicationServices.GetService <IHostingEnvironment>();
                Config.WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath;
                Config.DebugMode           = env.IsDevelopment();

                //Set VirtualFiles to point to ContentRootPath (Project Folder)
                VirtualFiles = new FileSystemVirtualFiles(env.ContentRootPath);
                AppHostBase.RegisterLicenseFromAppSettings(AppSettings);
                Config.MetadataRedirectPath = "metadata";
            }
        }
コード例 #3
0
        public virtual void Bind(IApplicationBuilder app)
        {
            this.app = app;

            if (pathBase != null)
            {
                this.app.UsePathBase(pathBase);
            }

            var env = app.ApplicationServices.GetService <IHostingEnvironment>();

            WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath;
            Config.DebugMode    = env.IsDevelopment();

            AppHostBase.RegisterLicenseFromAppSettings(AppSettings);
            Container.Adapter = new NetCoreContainerAdapter(app.ApplicationServices);
            app.Use(ProcessRequest);
        }