Interface IUmbracoContextFactory
Creates and manages IUmbraco
Namespace: Umbraco.Cms.Core.Web
Assembly: Umbraco.Core.dll
Syntax
public interface IUmbracoContextFactory
Methods
View SourceEnsureUmbracoContext()
Ensures that a current IUmbraco
Declaration
UmbracoContextReference EnsureUmbracoContext()
Returns
Type | Description |
---|---|
Umbraco |
Remarks
If an IUmbraco
Examples
using (var contextReference = contextFactory.EnsureUmbracoContext()) { var umbracoContext = contextReference.UmbracoContext; // use umbracoContext... }