Class UmbracoContextExtensions
Provides extension methods for UmbracoContext.
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:umbraco.dll
Syntax
public static class UmbracoContextExtensions
Methods
GetCurrentEventMessages(UmbracoContext)
If there are event messages in the current request this will return them , otherwise it will return null
Declaration
public static EventMessages GetCurrentEventMessages(this UmbracoContext umbracoContext)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext |
Returns
Type | Description |
---|---|
EventMessages |
GetUmbracoContext(HttpContext)
tries to get the Umbraco context from the HttpContext
Declaration
public static UmbracoContext GetUmbracoContext(this HttpContext http)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContext | http |
Returns
Type | Description |
---|---|
UmbracoContext |
Remarks
This is useful when working on async threads since the UmbracoContext is not copied over explicitly
GetUmbracoContext(HttpContextBase)
tries to get the Umbraco context from the HttpContext
Declaration
public static UmbracoContext GetUmbracoContext(this HttpContextBase http)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContextBase | http |
Returns
Type | Description |
---|---|
UmbracoContext |
Remarks
This is useful when working on async threads since the UmbracoContext is not copied over explicitly