Click or drag to resize

IAppContext Methods

The IAppContext type exposes the following members.

Methods
  NameDescription
Public methodAuthenticateUser(String)
Authenticates a user and populates the UserContext object. Note that if the application is being used to authenticate a different user than the one associated with the application (and therefore the user represented by UserContext) you must use the AuthenticateUser command.
Public methodAuthenticateUser(String, String, String)
Authenticates the current user and populates/creates the UserContext object using the specified IAuthenticationProvider. Note that if the application is being used to authenticate a different user than the one associated with the application (and therefore the user represented by UserContext) you must use the AuthenticateUser command.
Public methodAuthenticateUser(String, String, String, Int32)
Authenticates the current user and populates/creates the UserContext object using the specified IAuthenticationProvider. Note that if the application is being used to authenticate a different user than the one associated with the application (and therefore the user represented by UserContext) you must use the AuthenticateUser command.
Public methodClone
Clones this object and returns a new AppContext object.
Public methodClone(String, String)
Clones this object and returns a new AppContext object.
Public methodClone(String, String, String)
Clones this object and returns a new AppContext object.
Public methodClose
Closes the application's internal datasources and clean's up any user token state that exist.
Public methodDisplayMessage(Alert)
Registers a message, specified by the Alert object, for display on the next page rendering. Note that this page message facility is built on top of the existing Alerts functionality. The message information is stored in the xot_alerts table and delivered asynchronously via an AJAX call upon the next page rendering.
Public methodDisplayMessage(String, String, AlertDelivery, Int32, AlertAttrs)
Registers a message for display on the next page rendering. Note that this page message facility is built on top of the existing Alerts functionality. The message information is stored in the xot_alerts table and delivered asynchronously via an AJAX call upon the next page rendering.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodExec
The Exec method provides extended functionality.
(Inherited from IEAPBase.)
Public methodGetFirstNavigablePage
Returns the first navigable page for this user
Public methodGetPageInfo(String)
Get the PageInfo object for the specified MOP.
Public methodGetPageInfo(String, GetPageFlags)
Get the PageInfo object for the specified MOP per the provided flags.
Public methodGetPermaLink
Returns a permanant link to an item by inserting the QueryString parameters supplied into the main database's xot_url table.
Public methodGetResourceString
Returns the string for the given resource for this application's Culture.
Public methodGetText(String)
Returns a string from the TextItems collection
Public methodGetText(String, String)
Returns a string from the TextItems collection
Public methodHasFeature(String)
Returns true if the feature is implemented on the application.
Public methodHasFeature(String, String)
Returns true if the feature is implemented on the application and the requested property is used.
Public methodHasPermission
Returns true if the specified object "has" the specified ObjectPermissions. If the object has no assigned permisions, the return value is true.
Public methodHasPolicy(String) Obsolete.
Returns true if the current user has not been explicitly denied the policy. NOTE: This method is deprecated. Use HasPolicy(String, Boolean) instead for improved security.
Public methodHasPolicy(String, Boolean)
Returns true if the current user has been granted the policy.
Public methodHibernate
Command the AppContext object to hibernate until next round trip. Hibernated applications's are awoken via WakeUp.
Public methodInit
Initialize the AppContext object.
Public methodInit(AppContextInitOptions)
Initialize the AppContext object based on the provieded AppContextInitOptions.
Public methodLoad
Load the AppContext object from the database.
Public methodLoadComponent
Finds the specified component in the application's Components collection, loads it, verfies that it implements the requested interface (if specified), and returns the object. Normally an appropriate AssemblyLoadFail exception will be thrown if the component could not be found, loaded or requested interface obtained for any reason. However, if OkIfNotFound is set a failure will suppress any such error and result in null being returned.
Public methodLogPerformance
Log the performance metric of an object using a diagnostic service
Public methodNavigate(String)
Causes a Redirect to the specified page.
Public methodNavigate(String, String)
Causes a Redirect to the specified page.
Public methodNavigate(String, String, String)
Causes a Redirect to the specified page.
Public methodNavigate(String, String, String, String)
Causes a Redirect to the specified page.
Public methodNavigate(String, String, String, String, NavigateAttrs, String)
Causes a Redirect to the specified page.
Public methodOpenRepository
Open the repository IDatabase.
Public methodPermissions
Returns a bitmask of the object's ObjectPermissions. If the object has no assigned permissions, the return value is 0xffffffff (All permission bits are set)
Public methodRegisterDebugInfo(Page, String, String)
Register a dbginfo item on the page. These items will be emitted into the page HTML for debugging purposes and may be viewed by hitting F8 on the page.
Public methodRegisterDebugInfo(Page, String, String, String)
Register a dbginfo item on the page (with category information). These items will be emitted into the page HTML for debugging purposes and may be viewed by hitting F8 on the page.
Public methodRegisterDebugInfo(Page, String, String, String, LogMessageLevel)
Register a dbginfo item on the page (with caetgory and severity level). These items will be emitted into the page HTML for debugging purposes and may be viewed by hitting F8 on the page.
Public methodRegisterDebugInfo(Page, String, String, String, String)
Register a dbginfo item on the page (with category and sublist information). These items will be emitted into the page HTML for debugging purposes and may be viewed by hitting F8 on the page.
Public methodRegisterDebugInfo(Page, String, String, String, String, LogMessageLevel)
Register a dbginfo item on the page (with full information). These items will be emitted into the page HTML for debugging purposes and may be viewed by hitting F8 on the page.
Public methodRegisterEmbeddedFunction(String, String)
Registers an embedded function for use in SQL statments. The function name should not include the leading lowercase 'fn' associated with embedded functions.

See EmbeddedParser for more information on embedded functions.

Public methodCode exampleRegisterEmbeddedFunction(String, String, String)
Registers an embedded function for use in SQL statments. The function name should not include the leading lowercase 'fn' associated with embedded functions.

See EmbeddedParser for more information on embedded functions.

Embedded functions are automatically resolved for both DefaultValues on Field objects and Filters on Mapper objects.

Normally, you register an extension to run at startup and register custom functions in the ExtensionEvents.ApplicationAfterLoad event.

Public methodResolveEmbeddedFunctions
Resolve an expression string for embedded functions. See EmbeddedParser for more information on embedded functions.
Public methodSend(MailMessage)
Sends an email message using the contents of the message object.
Public methodSend(MailMessage, String)
Sends an email message using the contents of the message object and the specified email service.
Public methodSetUserTimeZone
Sets the user's timezone.
Public methodUrlRead
Reads a URL from the database xot_url table. URL's are generally stored in this manner for one of two purposes: 1) For permanent use as a saved reference of some type, and 2) As a temporary URL whose reference is passed as a query parameter (for security and to reduce query parameter size). Use UrlSave(String, UrlLinkType, NullableDateTime) to save URL's.
Public methodUrlSave
Stores a URL in the database xot_url table. URL's are generally stored in this manner for one of two purposes: 1) For permanent use as a saved reference of some type, and 2) As a temporary URL whose reference is passed as a query parameter (for security and to reduce query parameter size). Use UrlRead(String) to retrieve saved URL's.
Public methodUsesImplicitVocab
Returns true if the locationAttrs supports implicit vocab.
Public methodValidateCSRFToken
Validates the specified token against the CSRFToken. Note that if the ThrowStandardError option is specified then this method will throw the standard invalid CSRF token exception and will not return.
Public methodWakeUp
Command the AppContext object to wake up the database connections. Applications are hibernated via Hibernate.
Public methodWakeUp(WakeUpFlags)
Command the AppContext object to wake up the database connections. Applications are hibernated via Hibernate.
Top
Extension Methods
  NameDescription
Public Extension MethodBootstrapVersion
Returns the current Bootstrap version. For example, if the current version is 3.3.6 then this method returns 336. If it was version 4.1.3 then this method returns 413.
(Defined by AppContextExtensions.)
Public Extension MethodLogException
Logs an error and writes it to the request log
(Defined by ApplicationExtensionMethods.)
Public Extension MethodLogNextMapperSource
Extension method to IAppContext object to set a one-time-use logSource to be used on the next IMapper Init().
(Defined by AppContextExtensions.)
Public Extension MethodUIStyle
Gets the AppUIStyle application UI style.
(Defined by AppContextExtensions.)
Public Extension MethodUseBootstrap
Determines of this is a Bootstrap-based application. Note that currently this determination is based on whether or not bootstrap.master is set as the MasterPageFile.
(Defined by AppContextExtensions.)
Public Extension MethodUserAuthenticationView
Gets the AuthenticationView for the application which is the view to use for the DatabaseAuthenticationProvider during authentication. By default this is 'users'.
(Defined by ApplicationExtensionMethods.)
Top
See Also