Class HybridUmbracoContextAccessor
Implements a hybrid IUmbracoContextAccessor.
Namespace: Umbraco.Cms.Core.Web
Assembly: Umbraco.Core.dll
Syntax
public class HybridUmbracoContextAccessor : HybridAccessorBase<IUmbracoContext>, IUmbracoContextAccessor
Constructors
View SourceHybridUmbracoContextAccessor(IRequestCache)
Initializes a new instance of the HybridUmbracoContextAccessor class.
Declaration
public HybridUmbracoContextAccessor(IRequestCache requestCache)
Parameters
Type | Name | Description |
---|---|---|
IRequestCache | requestCache |
Methods
View SourceClear()
Clears the current IUmbracoContext object.
Declaration
public void Clear()
Set(IUmbracoContext)
Sets the IUmbracoContext object.
Declaration
public void Set(IUmbracoContext umbracoContext)
Parameters
Type | Name | Description |
---|---|---|
IUmbracoContext | umbracoContext |
TryGetUmbracoContext(out IUmbracoContext)
Tries to get the IUmbracoContext object.
Declaration
public bool TryGetUmbracoContext(out IUmbracoContext umbracoContext)
Parameters
Type | Name | Description |
---|---|---|
IUmbracoContext | umbracoContext |
Returns
Type | Description |
---|---|
System.Boolean |