Class UmbracoContextFactory
Creates and manages
Inheritance
System.Object
Namespace: Umbraco.Cms.Web.Common.UmbracoContext
Assembly: Umbraco.Web.Common.dll
Syntax
public class UmbracoContextFactory : IUmbracoContextFactory
Constructors
View SourceUmbracoContextFactory(IUmbracoContextAccessor, UmbracoRequestPaths, IHostingEnvironment, UriUtility, ICookieManager, IHttpContextAccessor, IWebProfilerService, ICacheManager)
Initializes a new instance of the UmbracoContextFactory class.
Declaration
public UmbracoContextFactory(IUmbracoContextAccessor umbracoContextAccessor, UmbracoRequestPaths umbracoRequestPaths, IHostingEnvironment hostingEnvironment, UriUtility uriUtility, ICookieManager cookieManager, IHttpContextAccessor httpContextAccessor, IWebProfilerService webProfilerService, ICacheManager cacheManager)
Parameters
| Type | Name | Description |
|---|---|---|
| IUmbracoContextAccessor | umbracoContextAccessor | |
| UmbracoRequestPaths | umbracoRequestPaths | |
| IHostingEnvironment | hostingEnvironment | |
| UriUtility | uriUtility | |
| ICookieManager | cookieManager | |
| Microsoft.AspNetCore.Http.IHttpContextAccessor | httpContextAccessor | |
| IWebProfilerService | webProfilerService | |
| ICacheManager | cacheManager |
Methods
View SourceEnsureUmbracoContext()
Declaration
public UmbracoContextReference EnsureUmbracoContext()
Returns
| Type | Description |
|---|---|
| UmbracoContextReference |