Application
Wisej.Web.Application
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Represent a Wisej application session. Provides methods and events to manage the application in the context of the current session.
This class provides several static methods, properties and events that allow the application to manage all sorts of features related to the current session:
Save and retrieve session variable. Use Session to store and retrieve session variable. The property is a dynamic object and a Dictionary, therefore you can access its properties directly or through the indexer.
Manage cookies. Use Cookies to manage browser's cookies.
Read server variables. Use ServerVariables to retrieve all the data made available by the server. Some of the variables in the collection are also available directly: ServerPort, ServerName, UserAgent, etc.
Read the application's URL. Use Uri, Url, StartupUri, and StartupUrl.
Read the applications's system information. Use StartupPath, ProductName, ProductVersion, etc.
Listen to the application's global events. See SessionTimeout , BeginRequest, ApplicationStart, ApplicationExitApplicationRefresh, BrowserSizeChangedResponsiveProfileChanged, CultureChanged, and many more.
Manage all live components in the session. Through the Application class you can find, iterate, inspect all live components of any type. See OpenForms for all the currently created (visible or invisible) instances of Form. OpenPages returns all the created Page objects. FindComponent and FindComponents provide an easy way to find any component in the session or to iterate the list of components that match a custom expression.
Start background tasks in context. StartTask provides a powerful way to start a background task on the server that can keep interacting with the client browser while running independently.
Manage the application's theme. Use LoadTheme to load a Wisej theme into the application. Or use the Theme object to read all sorts of information from the current ClientTheme.
Terminate the application without waiting for the session to timeout. Use Exit to terminate the current session and free all the related memory.
There is a lot more exposed by the Application class. You can inspect all the properties and methods in Visual Studio through IntelliSense or online at docs.wisej.
Properties
ActiveProfile
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ClientProfile: Returns or sets the current client responsive profile.
This is the profile that best matches the current browser on the client. It is updated automatically on every request.
Browser
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ClientBrowser: Returns or sets the client browser information.
ClientFingerprint
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Deprecated: Deprecated, please use Application.ClientId instead. UInt32: Returns the unique client "fingerprint" ID. It can be used to distinguish client devices.
The client fingerprint is generated by hashing all the available information returned by the browser (OS, user agent, version, etc.) and it's not guaranteed to be unique.
ClientId
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the current unique client id.
Clients
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ClientCollection: Returns a collection of all the unique client browsers using the application.
CommonAppDataPath
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the path for the application data that is shared among all users.
CommonAppDataRegistry
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
RegistryKey: Returns the registry key for the application data that is shared among all users.
CompanyName
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the company name associated with the application stored in the AssemblyCompanyAttribute.
Configuration
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Configuration: Returns the current Configuration.
Cookies
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
CookieCollection: Collection of cookies.
Current
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
IWisejComponent: Returns the application component instance that an application can store and use later to restore the context when updating client widgets during an out-of-bound call using Update
Threads that are not started using StartTask don't have any knowledge of the current session and don't have a way to communicate with the client The Current property returns the instance of the Application class that is bound to the current session. It can be used just like any other component with Update or RunInContext to restore the session for the current thread. The advantage of using Current instead of the instance of a control or a page is to avoid to keep a reference to a component that may be disposed by the application.
CurrentCulture
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
CultureInfo: Returns or sets the current CultureInfo for the session.
Desktop
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Desktop: Returns or sets the current Desktop.
EnableUnloadConfirmation
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns or sets whether the browser will ask the user to confirm unloading the current page.
This property attaches the window.onbeforeunload event. See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload. It's not possible to determine whether the page is being unloaded because the user is trying to close the tab, close the browser, or is refreshing the page, or is taking any other action that may reload the page.
ExecutablePath
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the path for the application's main assembly.
FavIcon
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Image: Returns or sets the favicon to display in the browser.
FavIconSource
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns or sets the URL to the favicon to display in the browser.
Hash
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns or sets the hash part of the URL on the client.
IsAuthenticated
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns a value indicating whether the session has been authenticated.
IsDisposed
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%252Finstance.png%3Falt%3Dmedia%26token%3D060b281d-9363-48a1-a0f9-788ad1831e96&width=300&dpr=4&quality=100&sign=2218e05e&sv=1)
Boolean: Indicates that the current application instance, which corresponds to the session, has been terminated and disposed.
IsExpired
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns true when the current session has expired.
IsSecure
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns true if this session is running in secure mode (https:// and wss://)
IsTerminated
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns true when the current session has been terminated.
IsWebSocket
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns true if the current session is connected using WebSocket.
LicenseKey
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns or sets the runtime server license key.
Setting the LicenseKey programmatically has to be done before the application is loaded. The best place is the static constructor for the Program static class, or the static constructor of the main window (if defined in Default.js).
MainPage
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Page: Returns or sets the current full page window.
OpenForms
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
FormCollection: Returns a collection of open forms owned by the application.
OpenPages
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
PageCollection: Returns a collection of open pages owned by the application.
Platform
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ClientPlatform: The name of the currently loaded platform.
ProductName
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the product name associated with this application.
ProductVersion
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the product version associated with this application stored either in AssemblyInformationalVersionAttribute or AssemblyFileVersionAttribute.
QueryString
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
NameValueCollection: Returns the parameters used to launch the application.
RightToLeft
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns or sets whether all the controls in the applications should operate using the right-to-left mode.
The value of this property is updated automatically when the current language changes if the value of "rightToLeft" in the application configuration file is set to "auto".
RuntimeMode
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns true when the application is running in not in design, debug or test mode.
ServerName
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.
ServerPort
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Int32: Returns the port number to which the request was sent.
ServerVariables
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
NameValueCollection: Returns the server variables.
Session
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Object: Provides a generic storage for session-based objects.
SessionCount
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Int32: Returns the total number of currently active sessions.
SessionId
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the unique current session ID.
ShowConsole
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Shows or hides the debug console on the browser.
Displays a simple HTMl only debug console. Works with any browser also when the developer tools are not available.
ShowLoader
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Boolean: Returns or sets whether the browser is blocked by the Ajax loader.
StartupPath
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the root path of the web application.
StartupUri
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Uri: Returns the URI used to start the application.
StartupUrl
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the URL used to start the application.
Theme
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ClientTheme: Returns or sets the current ClientTheme.
You can create and modify a new custom theme using the ClientTheme class. The new theme can be based on an existing theme, can be empty, or can be initialized from a JSON string.
You may also alter a global theme shared by all sessions.
Title
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns or sets the page title in the browser.
Uri
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Uri: Returns the current Uri used either to launch or reload the application. It may be different from StartupUri.
Url
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the current URL used either to launch or reload the application. It may be different from StartupUrl.
User
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
IPrincipal: Returns the security information for the current request.
UserAgent
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the raw user agent string of the client browser.
UserHostAddress
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the IP host address of the remote client.
UserHostName
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String: Returns the DNS name of the remote client.
UserIdentity
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
WindowsIdentity: Returns the WindowsIdentity type for the current user.
UserLanguages
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
String[]: Gets a sorted string array of client language preferences.
Methods
AddEventFilter(filter)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Adds an event filter to monitor all the incoming events before they are routed to their respective component.
Parameter | Type | Description |
---|---|---|
filter | An object that implements the IEventFilter interface to add to the filter list. |
AddTranslation(text, translation)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Adds the text and corresponding translation to the default locale on the client.
AlertAsync(message)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.
Parameter | Type | Description |
---|---|---|
message | A string you want to display in the alert dialog. |
Returns: Task. An awaitable Task that represents the asynchronous operation.
Call(function, args)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the JavaScript function on the client.
Parameter | Type | Description |
---|---|---|
function | The name of the function to execute. | |
args | The arguments to pass to the function. |
Call(function, callback, args)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the JavaScript function on the client and receives the return value (or null) in the callback method.
Parameter | Type | Description |
---|---|---|
function | The name of the function to execute. | |
callback | Asynchronous callback method that receives the return value. | |
args | The arguments to pass to the function. |
CallAsync(function, args)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Asynchronously executes the JavaScript function on the client and returns an awaitable Task with the result of the remote call.
Parameter | Type | Description |
---|---|---|
function | The name of the function to execute. | |
args | The arguments to pass to the function. |
Returns: Task<Object>. An awaitable Task that represents the asynchronous operation.
CancelFullScreen()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Cancels the fullscreen mode.
ConfirmAsync(message)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Instructs the browser to display a dialog with an optional message, and to wait until the user either confirms or cancels the dialog. until the user dismisses the dialog.
Parameter | Type | Description |
---|---|---|
message | A string you want to display in the confirm dialog. |
Returns: Task<Boolean>. An awaitable Task that represents the asynchronous operation.
Download(filePath, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the specified file on the client.
Parameter | Type | Description |
---|---|---|
filePath | The file to download. | |
fileName | The name of the file to save on the client. |
Download(image, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the specified image to the client.
Parameter | Type | Description |
---|---|---|
image | The image to download. | |
fileName | The name of the file to save on the client. |
Download(stream, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the bytes in the stream to the client.
Parameter | Type | Description |
---|---|---|
stream | The stream to send to the client. | |
fileName | The file name the client will use to save the stream. |
DownloadAndOpen(target, filePath, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the specified file on the client.
Parameter | Type | Description |
---|---|---|
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. | |
filePath | The file to download. | |
fileName | The name of the file to save on the client. |
DownloadAndOpen(target, image, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the specified image to the client.
Parameter | Type | Description |
---|---|---|
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. | |
image | The image to download. | |
fileName | The name of the file to save on the client. |
DownloadAndOpen(target, stream, fileName)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Downloads the bytes in the stream to the client.
Parameter | Type | Description |
---|---|---|
target | Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab. | |
stream | The stream to send to the client. | |
fileName | The file name the client will use to save the stream. |
EndPolling()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Stops the polling requests from the client.
Eval(script)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the JavaScript script on the client.
Parameter | Type | Description |
---|---|---|
script | The script to evaluate. |
Eval(script, callback)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the JavaScript script on the client and receives the return value (or null) in the callback method.
Parameter | Type | Description |
---|---|---|
script | The script to evaluate. | |
callback | Asynchronous callback method that receives the return value. |
EvalAsync(script)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Asynchronously executes the JavaScript script on the client and returns an awaitable Task with the result of the remote call.
Parameter | Type | Description |
---|---|---|
script | The script to evaluate. |
Returns: Task<Object>. An awaitable Task that represents the asynchronous operation.
Exit()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Terminates the application and the corresponding session.
FindComponent(match)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Find the first component that matches the conditions defined in the predicate function.
Parameter | Type | Description |
---|---|---|
match | A custom Predicate expression used to match the IWisejComponent to find. |
Returns: IWisejComponent. The first IWisejComponent qualified by the match expression.
This method lets an application find any live component in the current session.
FindComponents(match)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Finds all the components that match the conditions in the predicate function.
Parameter | Type | Description |
---|---|---|
match | A custom Predicate expression used to match the list of IWisejComponent objects to find. |
Returns: IList<IWisejComponent>. The list of IWisejComponent instances qualified by the match expression.
This method lets an application iterate through all the live components in the current session.
LoadAssembly(filePath)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Loads an assembly given the file name or path.
Parameter | Type | Description |
---|---|---|
filePath | The file name or full path for the assembly to load. |
Returns: Assembly. The loaded Assembly.
This method loads the assembly and, if the assembly contains Wisej components that need embedded resources - like JavaScript classes or CSS styles - that are embedded in the assembly, notifies the client with the URL to load the additional resources dynamically.
LoadComponent(filePath, className)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Creates an instance of the specified component from the assembly.
Parameter | Type | Description |
---|---|---|
filePath | The file name or full path for the assembly to load. | |
className |
Returns: IWisejComponent. An instance of a Wisej component implementing the IWisejComponent interface.
LoadPackages(packages, callback)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Parameter | Type | Description |
---|---|---|
packages | ||
callback |
LoadPackagesAsync(packages)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Parameter | Type | Description |
---|---|---|
packages |
Returns: Task<Boolean>.
LoadTheme(name, mixins)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Changes the current theme.
Parameter | Type | Description |
---|---|---|
name | Name of the theme resource. Use only the name without the path and without the extension. | |
mixins | Optional list of theme mixins. If null, the default theme mixins are always applied. |
MapPath(path)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Returns the full file path in relation to the application's project directory.
Parameter | Type | Description |
---|---|---|
path |
Returns: String. The full path relative to the current application's root directory.
Navigate(url, target)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Navigate to the specified URL.
Parameter | Type | Description |
---|---|---|
url | URL to navigate to. | |
target | The target browser window: _self, _blank, etc. |
Play(type)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Plays one of the built-in sounds
Parameter | Type | Description |
---|---|---|
type | One of MessageBoxIcon value that identifies the sound to play. |
Play(soundUrl)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Plays a sound.
Parameter | Type | Description |
---|---|---|
soundUrl | A string representing either a sound file URL or a base64 data URL. |
Post(callback)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the callback method after all processing is completed and before updating the client.
Parameter | Type | Description |
---|---|---|
callback | Method to invoke after the request has completed but before sending the response to the server. |
The Post() method is similar to the BeginInvoke() method used by desktop applications. It allows you to execute a block of code out of sync with the current execution flow.
Print(window)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Prints the specified window.
Parameter | Type | Description |
---|---|---|
window | The window to print |
The window is printed without the caption or the borders, if present.
Print()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Prints the entire browser window.
PromptAsync(message, defaultValue)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.
Parameter | Type | Description |
---|---|---|
message | A string of text to display to the user. | |
defaultValue | An optoional string containing the default value displayed in the text input field. |
Returns: Task<String>. An awaitable Task that represents the asynchronous operation.
Reload()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Causes the application to reload on the browser.
RemoveEventFilter(filter)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Removes the filter from the list of registered event filters.
Parameter | Type | Description |
---|---|---|
filter | An object that implements the IEventFilter interface to remove from the filter list. |
RequestFullScreen()
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Requests the browser to enable fullscreen mode if supported.
RunInContext(context, action)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the callback in context.
Parameter | Type | Description |
---|---|---|
context | The application context to update. It can be any Wisej component or the IWisejComponent returned by the property Context. | |
action | Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread. |
SetSessionTimeout(seconds)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Sets the current session timeout in seconds.
Parameter | Type | Description |
---|---|---|
seconds |
StartPolling(interval)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Instructs the client to start polling the server for UI changes at the specified interval when a WebSocket connection is not available.
Parameter | Type | Description |
---|---|---|
interval | Polling interval in milliseconds. The minimum is 1000ms. |
Calling this method when IsWebSocket is true has no effect. Use client side polling when you know that your code will start a background task that needs to update the client asynchronously (push updates) and your server or clients don't support WebSocket connections. Once the background tasks are completed call EndPolling to reduce the incoming requests from the client.
Throws:
ArgumentOutOfRangeException The interval specified is less than 1.
StartTask(action)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Starts a new task within the current application context and returns immediately. See also background-tasks.
Parameter | Type | Description |
---|---|---|
action | Start method invoked by the new task when it starts up. |
Returns: Task. An awaitable Task.
The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the Update method to push the UI updates to the client browser. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a Timer component to the parent container to force period requests to the server, or you can use the StartPolling and EndPolling methods.
StartTask<T>(action)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Starts a new task with a return value within the current application context and returns immediately. See also background-tasks.
Parameter | Type | Description |
---|---|---|
T | ||
action | Start method invoked by the new task when it starts up. |
Returns: Task<T>.
The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the Update method to push the UI updates to the client browser. The generics overload of StartTask allows the task to return a value. You can use this with the async/await pattern and asynchronously wait for the task to complete. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a Timer component to the parent container to force period requests to the server, or you can use the StartPolling and EndPolling methods.
Note that you don't have to specify the type in the angular brackets, the compiler will automatically detect the type from the return value of the asynchronous function.
StartTimer(dueTime, period, callback)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Starts a Timer bound to the current session context.
Parameter | Type | Description |
---|---|---|
dueTime | The amount of time, in milliseconds, to delay before invoking the callback . | |
period | The time interval between invocations, in milliseconds. | |
callback | A callback method to invoke at the specified intervals. |
Returns: Timer. An instance of Timer.
You must save a reference to the returned Timer or the Garbage Collector will stop and dispose the timer. To alter the invocation period user Timer.Changer(), or stop the timer simply use Timer.Dispose(). See system.threading.
Update(context, action)
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
Executes the optional callback in context and pushes all the pending updates to the client when in WebSocket mode.
Parameter | Type | Description |
---|---|---|
context | The application context to update. It can be any Wisej component or the IWisejComponent returned by the property Context. | |
action | Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread. |
Use this method when you need to update the client asynchronously from an out-of-bound thread (different thread, not originating from a client request). You can call this method at the end of the code that updates the UI:
Or you can use the optional action function to enclose the code that updates the UI in a block and ensure that the client is updated when the code block exits:
Events
ActiveWindowChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the active window changes.
ApplicationExit
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the application is about to shut down.
ApplicationRefresh
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the application is reloaded in the browser because the user hit refresh or changed the URL.
ApplicationStart
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the application is started, after the Main method is called.
BeforeInstallPrompt
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the browser fires the "beforeinstallprompt" event. Corresponds to BeforeInstallPromptEvent.
BeginRequest
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired at the beginning of every request.
BrowserSizeChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the user resizes the browser.
BrowserTabActivated
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the user activates the browser tab.
BrowserTabDeactivated
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the user deactivates the browser tab.
CultureChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the CurrentCulture changes.
EndRequest
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired at the end of every request.
FocusedControlChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the focused control changes.
HashChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
HashChangedEventHandler Fired when the hash part of the URL changes on the client side.
Idle
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the current thread has completed processing all the events and before the response is sent back to the client.
LicenseError
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
LicenseErrorEventHandler Fired when a license error occurs.
ResponsiveProfileChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ResponsiveProfileChangedEventHandler Fired when the active responsive profile is changed.
RightToLeftChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the RightToLeft value changes.
SessionTimeout
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
HandledEventHandler Fired when the session is about to time out.
The default behavior built-in Wisej is to display a dialog asking the user to prolong the session. Set Handled to true to stop the default behavior.
ThemeChanged
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
EventHandler Fired when the current theme is changed.
ThreadException
![](https://docs.wisej.com/~gitbook/image?url=https%3A%2F%2F314832588-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MTHCfAYyBPycFG90wsw-4198400543%252Fuploads%252Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%252Fstatic.png%3Falt%3Dmedia%26token%3Ddc9abd99-218e-40f7-adc3-49d597c6a8fa&width=300&dpr=4&quality=100&sign=73c74f31&sv=1)
ThreadExceptionEventHandler Fired when a thread exception is thrown.
Implements
Name | Description |
---|---|
All wisej components implement this interface. |
Last updated