public override void OnConfigLoad() { if (app != null) { //Initialize VFS var env = app.ApplicationServices.GetService <IHostingEnvironment>(); Config.WebHostPhysicalPath = env.WebRootPath ?? env.ContentRootPath; AppHostBase.RegisterLicenseFromAppSettings(AppSettings); } }
public virtual void Bind(IApplicationBuilder app) { this.app = app; if (pathBase != null) { this.app.UsePathBase(pathBase); } AppHostBase.BindHost(this, app); app.Use(ProcessRequest); }
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"; } }
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); }
public static void UseServiceStack(this IApplicationBuilder app, AppHostBase appHost) { appHost.Bind(app); appHost.Init(); }
public virtual void Bind(IApplicationBuilder app) { this.app = app; AppHostBase.BindHost(this, app); app.Use(ProcessRequest); }
public override IRequest TryGetCurrentRequest() { return(AppHostBase.GetOrCreateRequest(app.ApplicationServices.GetService <IHttpContextAccessor>())); }
public static IApplicationBuilder UseServiceStack(this IApplicationBuilder app, AppHostBase appHost) { appHost.Bind(app); appHost.Init(); return app; }
public static IApplicationBuilder UseServiceStack(this IApplicationBuilder app, AppHostBase appHost) { appHost.Bind(app); return(app); }
protected AppHostBase(string serviceName, params Assembly[] assembliesWithServices) : base(serviceName, assembliesWithServices) { NetCoreInstance = this; }