Class ExecutingContext
- Namespace
- Dynamicweb.Environment
- Assembly
- Dynamicweb.Core.dll
Provides static members for Dynamicweb environment variables.
- Inheritance
-
Executing
Context
- Inherited Members
Methods
GetCulture()
Gets the culture of the current execution context.
Returns
- Culture
Info CultureInfo instance.
Remarks
If called from a frontend pipeline, it returns the CultureInfo
of the current thread which is set by the regional settings of the website instance that belongs to the pageview. If it is called before the website is detected, before PageView.Load(), the system culture is returned.
If called from a backend context, it returns a CultureInfo
based on the current backend language if the user is logged in.
If called from another context, i.e. a http handler or a context where there is not pageview, no logged in user or no session, InvariantCulture
is returned.
GetCulture(bool)
Gets the culture of the current execution context.
Parameters
frontEnd
boolif set to
true
, return the CultureInfo that is currently being used in the pageview. If this is set to true and a pageview instance is not present,CurrentCulture
is returned.
Returns
- Culture
Info CultureInfo instance.
Remarks
If called from a frontend pipeline, it returns the CultureInfo
of the current thread which is set by the regional settings of the website instance that belongs to the pageview. If it is called before the website is detected, before PageView.Load(), the system culture is returned.
If called from a backend context, it returns a CultureInfo
based on the current backend language if the user is logged in.
If called from another context, i.e. a http handler or a context where there is not pageview, no logged in user or no session, InvariantCulture
is returned.
IsBackEnd()
Gets a value indicating whether the current code is being executed in the administration (/Admin or /CustomModules - except /Admin/Public)
Returns
- bool
true
if in backend; otherwise,false
.
IsBackEndUrl(string)
Determines whether the specified URL is part of the Dynamicweb administration
Parameters
url
stringThe URL.
Returns
- bool
true
if the specified url is a backend url; otherwise,false
.
IsBackEndUrl(Uri?)
Determines whether the specified URL is part of the Dynamicweb administration
Parameters
url
UriThe URL.
Returns
- bool
true
if the specified url is a backend url; otherwise,false
.
IsFrontEnd()
Gets a value indicating whether the current code is being executed in the frontend
Returns
- bool
true
if in frontend; otherwise,false
.