Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Wisej.Core.ClientCollection
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
List of Clients using the application.
Initializes a new instance of ClientCollection.
Int32: Returns the total number of Client items in the collection.
Client: Returns the Client at the specified index .
clientId
browser
clientId
browser
Wisej.Core.Client
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Represents a unique client using the application.
A browser instance is a single client, regardless of how many sessions are created by that client and how many browser tabs are open. Different browsers a represented as different clients.
ClientBrowser[]: List of browser tabs (for the same browser) that are using the application at the client computer.
String: Unique client ID.
String: IP Address of the client computer.
Int32: Returns the number of sessions used by this client computer.
browser
browser
Wisej.Web.Application
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.0.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 application'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.
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.
IWisejWindow: Stores the currently active window.
ClientBrowser: Returns or the client browser's information.
X509Certificate2: EXPERIMENTAL: Provides the client certificate fields issued by the client in response to the server's request for the client's identity. Since 3.5.6
String: Returns the current unique client id.
ClientCollection: Returns a collection of all the unique client browsers using the application.
CommandManager: Returns the current CommandManager.
String: Returns the path for the application data that is shared among all users.
RegistryKey: Returns the registry key for the application data that is shared among all users.
String: Returns the company name associated with the application stored in the AssemblyCompanyAttribute.
Configuration: Returns the current Configuration.
CookieCollection: Collection of cookies.
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 the Update method.
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 the method 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.
CultureInfo: Returns or sets the current CultureInfo for the session.
LicenseInfo: Returns the currently loaded LicenseInfo.
Desktop: Returns or sets the current Desktop.
DragDrop: State for the current drag-drop operation.
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.
String: Returns the path for the application's main assembly.
Boolean: Returns true if the application has expired.
Image: Returns or sets the favicon to display in the browser.
String: Returns or sets the URL to the favicon to display in the browser.
IWisejControl: Stores the currently active form.
String: Returns or sets the hash part of the URL on the client.
Boolean: Returns whether the application called Update.
Int32: The current instance ID. This is a counter that increases every time the application session is reloaded in a browser or tab.
Boolean: Returns a value indicating whether the session has been authenticated.
Boolean: Marks the application instance as dirty.
Boolean: Indicates that the current application instance, which corresponds to the session, has been terminated and disposed.
Boolean: Returns true when the current session has expired.
Boolean: Returns true if this session is running in secure mode (https:// and wss://)
Boolean: Returns true when the current session has been terminated.
Boolean: Returns true if the current session is connected using WebSocket.
Object: Returns a dynamic object containing the currently loaded license information. Since 3.1.3
These are the currently available fields (may change in future releases):
Valid: Whether the license is valid. Note that a license may be expired and valid if the product release date is within the license expiration date.
LicenseKey: License key loaded from web.config or assigned to LicenseKey.
ProductName: Full name of the licensed product.
CustomerName: Name of the registered customer that owns the license.
ExpirationDate: Expiration date for the product free updates.
Retrieve the values either using a dynamic object or a property indexer:
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).
Keys: Returns a value indicating which of the lock keys (CAPS, NUM, SCROLL) is in a pressed state.
MethodInfo: The Main entry point.
Page: Returns or sets the current full page window.
Type: Returns the main window type.
Keys: Returns a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state.
MouseButtons: Returns a value indicating which of the mouse buttons is in a pressed state.
Control: Holds the control that has captured the mouse.
Point: Returns the position of the mouse cursor in screen coordinates.
FormCollection: Returns a collection of open forms owned by the application.
PageCollection: Returns a collection of open pages owned by the application.
WindowCollection: Returns a collection of open forms owned by the application.
ClientPlatform: The name of the currently loaded platform.
String: Returns the product name associated with this application.
String: Returns the product version associated with this application stored either in AssemblyInformationalVersionAttribute or AssemblyFileVersionAttribute.
NameValueCollection: Returns the parameters used to launch the application.
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".
Boolean: Returns true when the application is running in not in design, debug or test mode.
String: Returns the server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.
Int32: Returns the port number to which the request was sent.
NameValueCollection: Returns the server variables.
ServiceProvider: Returns the ServiceProvider implementation used by Wisej.NET to manage Dependency Injection across the application. Since 3.1
Object: Provides a generic storage for session-based objects.
Int32: Returns the total number of currently active sessions.
String: Returns the unique current session ID.
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.
Boolean: Returns or sets whether the browser is blocked by the Ajax loader.
Boolean: Sets the state of the loader and updates the client.
String: Returns the root path of the web application.
Uri: Returns the URI used to start the application.
String: Returns the URL used to start the application.
Boolean: Returns true if the application has been terminated.
Application: The current Application instance.
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.
String: Returns or sets the page title in the browser.
Uri: Returns the current Uri used either to launch or reload the application. It may be different from StartupUri.
String: Returns the current URL used either to launch or reload the application. It may be different from StartupUrl.
IPrincipal: Returns the security information for the current request.
String: Returns the raw user agent string of the client browser.
String: Returns the IP host address of the remote client.
String: Returns the DNS name of the remote client.
WindowsIdentity: Returns the WindowsIdentity type for the current user.
String[]: Gets a sorted string array of client language preferences.
Int32: Returns a value indicating the wheel delta from the last wheel event.
Adds an event filter to monitor all the incoming events before they are routed to their respective component.
filter
Adds the text and corresponding translation to the default locale on the client.
text
The text to translate.
translation
The translation override.
Adds the text and corresponding translation to the default locale on the client.
text
The text to translate.
translation
The translation override.
Instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.
message
A string you want to display in the alert dialog.
Returns: Task. An awaitable Task that represents the asynchronous operation.
Executes the JavaScript function on the client.
function
The name of the function to execute.
args
The arguments to pass to the function.
Executes the JavaScript function on the client and receives the return value (or null) in the callback method.
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.
Asynchronously executes the JavaScript function on the client and returns an awaitable Task with the result of the remote call.
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.
Cancels the fullscreen mode.
Verifies premium extensions license.
control
Verifies the server license.
context
Returns: Boolean.
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.
message
A string you want to display in the confirm dialog.
Returns: Task<Boolean>. An awaitable Task that represents the asynchronous operation.
Downloads the specified file on the client.
filePath
The file to download.
The name of the file to save on the client.
Optional callback invoked when fileName is downloaded.
Downloads the specified image to the client.
image
The image to download.
fileName
The name of the file to save on the client.
Optional callback invoked when fileName is downloaded.
Downloads the bytes in the stream to the client.
stream
The stream to send to the client.
fileName
The file name the client will use to save the stream.
Optional callback invoked when fileName is downloaded.
Downloads the specified file on the client.
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.
The name of the file to save on the client.
Optional callback invoked when fileName is downloaded.
Downloads the specified image to the client.
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.
Optional callback invoked when fileName is downloaded.
Downloads the bytes in the stream to the client.
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.
Optional callback invoked when fileName is downloaded.
Stops the polling requests from the client.
Executes the JavaScript script on the client.
script
The script to evaluate.
Executes the JavaScript script on the client and receives the return value (or null) in the callback method.
script
The script to evaluate.
callback
Asynchronous callback method that receives the return value.
Asynchronously executes the JavaScript script on the client and returns an awaitable Task with the result of the remote call.
script
The script to evaluate.
Returns: Task<Object>. An awaitable Task that represents the asynchronous operation.
Terminates the application and the corresponding session.
Expires the application.
Find the first component that matches the conditions defined in the predicate function.
match
Returns: IWisejComponent. The first IWisejComponent qualified by the match expression.
This method lets an application find any live component in the current session.
Finds all the components that match the conditions in the predicate function.
match
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.
Returns the AppContext switch.
name
Name of the switch.
defaultValue
Default value.
Returns: Boolean.
Returns: Object.
Returns the unique id that identifies the callback method ondownload .
ondownload
Returns: Int32.
Returns a session-static instance of T . Since 3.2.7
T
Type of the singleton object.
Thread-static reference to the T singleton.
Optional method for the creation of an instance of T .
Returns: T. The singleton instance of T associated with the current session.
This utility method simplifies the management of session-static (or session singleton) instances. It should be used to convert traditional static variables to session-static instances when changing an application designed for single users to a multi-user system. The code below shows how to use this feature together with the ThreadStaticAttribute to manage session-static instances and, at the same time, improve the speed of the code that relies on the singleton objects. Using the ThreadStaticAttribute backing field allows the code that retrieves the session-static instance to quickly check the last instance and compare the session id and avoid accessing the dictionary for every access within the same request. Otherwise the code would have to always store a local variable in order to speed up multiple operations using the same static field.
If the class a private constructor (to simulate a static class) or required initialization code or arguments, use the optional builder method:
Returns the main application assembly. That is the assembly with the Main method or the assembly with the MainForm.
Returns: Assembly.
Returns the main application assembly. That is the assembly with the Main method or the assembly with the MainForm.
configuration
Returns: Assembly.
Returns the localized string from the application's resources.
name
Returns: String.
Invoked the download callback method identified by id .
id
fileName
Checks if the exception is considered critical.
ex
Returns: Boolean.
Creates a new instance of the proper Application class and: - Prepares the platform, theme and browser objects - Invokes the startup main method in the configuration file - And/or creates the main form defined in the configuration file
context
Web request context.
message
Message data received by the client. Contains the session id and the startup arguments.
Loads an assembly given the file name or path.
nameOrFile
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.
Creates an instance of the specified component from the assembly.
nameOrFile
The file name or full path for the assembly to load.
className
Returns: IWisejComponent. An instance of a Wisej component implementing the IWisejComponent interface.
packages
packages
Returns: Task<Boolean>.
Changes the current theme.
name
Name of the theme resource. Use only the name without the path and without the extension.
Optional list of theme mixins. If null, the default theme mixins are always applied.
Returns the full file path in relation to the application's project directory.
path
Returns: String. The full path relative to the current application's root directory.
Navigate to the specified URL.
url
URL to navigate to.
The target browser window: _self, _blank, etc.
Navigate to the specified URL in a new browser tab and receive an optional callback when the tab is closed.
url
URL to navigate to.
target
The target browser window, cannot be _self and cannot be empty.
onclose
Callback function invoked when the browser tab is closed. Can be null.
Initializes the application instance.
context
Web request context.
Refreshes the application instance on a browser reload.
context
Web request context.
Process the session timeout requests: - Display alert dialog - Prolong the session upon user request - or terminate the app.
Process unhandled exceptions.
ex
Returns: Boolean.
Opens the specified URL in a browser's popup window and receive an optional callback when the tab is closed.
url
URL to navigate to.
target
The target browser window, cannot be _self and cannot be empty.
windowFeatures
A string containing a comma-separated list of window features in the form name=value — or for boolean features, just name. These features include options such as the window's default size and position, whether or not to open a minimal popup window, and so forth.
onclose
Callback function invoked when the browser popup window is closed. Can be null.
Plays one of the built-in sounds
type
Plays a sound.
soundUrl
A string representing either a sound file URL or a base64 data URL.
Executes the callback method after all processing is completed and before updating the client.
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.
Prints the specified control.
control
The control to print, can be a window, a page or a single control.
The control is printed without the caption or the borders, if present.
Prints the entire browser window.
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.
message
A string of text to display to the user.
An optoional string containing the default value displayed in the text input field.
Returns: Task<String>. An awaitable Task that represents the asynchronous operation.
Raises the ActiveWindowChanged event.
window
Window that has been activated
Raise the ApplicationExit event.
Raise the ApplicationRefresh event.
Raise the ApplicationStart event.
Raises the BeforeInstallPrompt event. It corresponds to https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent.
Raise the BeginRequest event.
type
Raise the BrowserSizeChanged event.
Raise the BrowserTabActivated event.
Raise the BrowserTabDeactivated event.
Raise the CultureChanged event.
Raise the EndRequest event.
type
Raise the EnterThreadModal event.
Raises the FocusedControlChanged event.
control
Control that gained the focus.
Raise the HashChanged event.
hash
New has string.
Raise the Idle event.
Raise the LeaveThreadModal event.
Raise the LicenseError event.
error
Raise the ResponsiveProfileChanged event.
oldValue
newValue
Raise the RightToLeftChanged event.
Raise the SessionTimeout event.
Returns: Boolean.
Raise the ThemeChanged event.
Raise the ThreadBegin event.
Raise the ThreadEnd event.
Raise the ThreadException event.
exception
The exception raised on the current thread.
Returns: Boolean. true if the event was fired.
Updates the application on a browser refresh.
Generates a new session id without losing the session. Since 3.5.2
Use this method after a successful login to prevent potential session fixation attacks.
Causes the application to reload on the browser.
Updates the application URL, arguments, cookies, browser metrics, and culture.
context
Web request context.
message
Message data received by the client. Contains the session id and the startup arguments.
Removes all the download callbacks for the specified context .
context
Removes the filter from the list of registered event filters.
filter
Requests the browser to enable fullscreen mode if supported.
Executes the callback in context.
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.
Replaces the object assigned to a session-static singleton. Since 3.5.2
T
Type of the session-static object.
Thread-static reference to the T singleton.
instance
New value to assign to the session-static storage.
Sets the current session timeout in seconds.
seconds
Invokes the main method defined in the application configuration file and/or created the main window.
Instructs the client to start polling the server for UI changes at the specified interval when a WebSocket connection is not available.
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.
Starts a new task within the current application context and returns immediately. See also background-tasks.
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.
Starts a new task with a return value within the current application context and returns immediately. See also background-tasks.
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.
Starts a Timer bound to the current session context.
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.
Forces a full refresh of the application state.
Executes the optional callback in context and pushes all the pending updates to the client when in WebSocket mode.
context
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:
Updates the current thread culture to match the session's culture.
EventHandler Fired when the active window changes.
EventHandler Fired when the application is about to shut down.
EventHandler Fired when the application is reloaded in the browser because the user hit refresh or changed the URL.
EventHandler Fired when the application is started, after the Main method is called.
EventHandler Fired when the browser fires the "beforeinstallprompt" event. Corresponds to BeforeInstallPromptEvent.
RequestEventHandler Fired at the beginning of every request.
EventHandler Fired when the user resizes the browser.
EventHandler Fired when the user activates the browser tab.
EventHandler Fired when the user deactivates the browser tab.
EventHandler Fired when the CurrentCulture changes.
RequestEventHandler Fired at the end of every request.
EventHandler Fired when the focused control changes.
HashChangedEventHandler Fired when the hash part of the URL changes on the client side.
EventHandler Fired when the current thread has completed processing all the events and before the response is sent back to the client.
HandledEventHandler Fired right after ThreadBegin, only when Impersonate is set to true, to allow user code to take over the thread impersonation operations.
Set e.Handled to true if your application takes care of impersonation; otherwise false to let the default implementation attempt to impersonate the user. This event is not related to a session. It is best to attach to this event from a static type initializer, otherwise each listener will be called for every thread, regardless of the session. The default implementation in Wisej.NET is supported only in .NET Framework and the Windows platform.
HandledEventHandler Fired at the end of every request when impersonation is enabled in the JSON configuration file.
Set e.Handled to true if your application takes care of impersonation; otherwise false to let the default implementation attempt to impersonate the user. This event is not related to a session. It is best to attach to this event from a static type initializer, otherwise each listener will be called for every thread, regardless of the session. The default implementation in Wisej.NET is supported only in .NET Framework and the Windows platform.
LicenseErrorEventHandler Fired when a license error occurs.
ResponsiveProfileChangedEventHandler Fired when the active responsive profile is changed.
EventHandler Fired when the RightToLeft value changes.
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.
EventHandler Fired when the current theme is changed.
ThreadExceptionEventHandler Fired when a thread exception is thrown.
All wisej components implement this interface.
Wisej.Core.ClientBrowser
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Properties of the client browser currently interacting with the application.
CookieStorage
LocalStorage
SessionStorage
CultureInfo: Returns the locale declared in the application configuration file or detected from the client browser.
String: Device type. Can be one of "Mobile", "Tablet" or "Desktop".
Object: Returns the set of features supported/not-supported by the browser. Currently we detect: geolocation, webSocket, fullScreen, speechSynthesis, speechRecognition, notification, fullScreen, browserStorage.
String: IP Address of the client computer.
Boolean: Returns true if the browser is using dark mode. Since 3.0.10
Boolean: Returns true if the browser is in full screen mode.
Boolean: Returns true if the connection is secure.
String: Client language.
String: Client OS. Can be one of "iOS", "Android", "WebOS", "BlackBerry", "MacOS", "Linux", "Windows", "Unix", "Other".
Double: Returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.
Size: Screen size.
String: Returns the session ID associated with this ClientBrowser.
Size: Browser size. This is the window size, which can be different from the device (or screen) size.
String: Identifies the browser tab associated with with this ClientBrowser instance.
String: Returns the current IANA time zone name. See timezone. Since 3.5.12
TimeZoneInfo: Returns an instance of TimeZoneInfo for the current TimezoneId. May be null when the IANA time zone id cannot be resolved on the server. Since 3.5.12
Int32: Returns the time difference between UTC time and local time, in minutes.
String: Browser type. Can be one of "IE", "Edge", "Chrome", "Opera", "Firefox", "Safari", "Other".
String: Returns the raw user agent string of the client browser.
Object: Returns a value or map set by the client when loading the application's first HTML page.
An application can use this property to retrieve a custom value on startup. For example, in Default.html add:
On the server side, you can retrieve the user data use at any time like this:
When used in conjunction with an aspx startup page (Default.aspx) it allows the application to retrieve data passed as a POST request and pass it to the Wisej application.
Int32: Browser version.
Returns the merged default profiles + custom profiles.
configPath
Returns: List<ClientProfile>.
ianaId
len
windowsId
windowsIdLength
Returns: Int32.
Updates the client metrics.
args
Provides access to the UserData
and Tag
properties associated to the component implementing this interface.
Wisej.Core.ClientPlatform
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Represents the client platform used to render the widgets.
String[]: List of javascript files associated with the platform.
String: The name of this platform configuration.
PlatformProvider: The platform provider.
String[]: List of style sheets associated with the platform.
Version: Returns the file version of the
Wisej.Core.Configuration
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Configuration settings.
Creates a new instance from the specified json string.
json
The json string that defines the configuration values.
String[]: List of allowed Url routes separated by a semicolon. i.e.: "api;product;log/performance".
Boolean: When true, the application is automatically reloaded when the session expires or Exit is called.
The application can always override this feature by changing the Wisej.onExit method using a script.
String: The custom function used to validate the browser. If it returns false the browser is not supported and Wisej redirects to NotSupportedUrl.
String: Returns the culture set at the application's level. It can be any of the supported cultures or the keyword "auto", in which case we will detect the culture from the browser.
Boolean: Enables/disables debug mode.
Boolean: When true, the client will not be able to access the application's controls using the object model registered with javascript under the "App" namespace.
Boolean: When true, dynamic minification is turned off also in release mode.
Boolean: When true, the client drops all "execute" events triggered while there is a pending request.
String: Cache-Control for embedded resources. The default is "browser" to cache the embedded resources on the browser for 1 month. Other allowed vaues are: - "server" to cache the resources on the server using the ETag header - "private, max-age=..." to use set the standard Cache-Control header - any value Cache-Control string value.
Boolean: Enables the PWA installation of the application.
Boolean: Enables/disables the WebSocket protocol.
Boolean: Enables/disables gzip compression when using the WebSocket protocol.
Exception: Returns the exception that was handled when loading the json configuration file.
String: The full path of the configuration file.
Boolean: Enables impersonation mode.
When set to true and windows authentication is configured in web.config, every request thread and application tasks started using Application.StartTask will impersonate the current user.
String[]: Returns the list of the invalid entries found on the configuration file.
Boolean: Checks whether this instance is the same as the shared Empty instance.
Nullable<Boolean>: Returns null when RightToLeft is set to "auto". Otherwise returns whether RightToLeft is "true" or "false".
Int32: The keep-alive interval in seconds.
String: Name of the page loader resource to show at startup.
Int32: The ajax loader timeout in milliseconds.
String: Full name of the first window created automatically at startup.
Int32: Returns the maximum number of nested modal loops.
Int32: Returns the maximum number of active sessions before redirecting to NotAvailableUrl.
Int32: Network check interval in milliseconds. The default is 1000 (1 second). If this value is set, Wisej will send a /healthcheck.wx request at the specified interval when the application goes offline.
String: The URL of the page to load when the server cannot respond to the request.
String: The URL of the page to load when the client browser is not supported.
String: The URL of the page to load when the connection is lost.
Object: Native client-side platform options.
Int32: Polling interval in milliseconds. The default is zero (disabled). If this value is set, the polling starts when the application is loaded.
The polling interval determines the frequency of the automatic poll requests coming from the client when a WebSocket connection is not available. When the client is connected using a WebSocket channel, this value is ignored. An application that wants to enable automatic client updates in absence of a WebSocket connection can set this value, or it can call StartPolling and EndPolling to start and terminate the automatic polling from the client. Both methods are ignored when the client is using a WebSocket connection.
Int32: The timeout for the server to respond to a Wisej request in seconds.
String: Returns the rightToLeft mode. It can be "true", "false", or "auto". When set to "auto" the RightToLeft layout is enabled automatically using the current language. The default is "auto".
Boolean: Forces the client to switch to a secure connection (HTTPS and WSS).
String: Where to save the session id on the client. The default is "session" to indicate the browser's sessionStorage. It can be changed to "local" to indicate the browser's localStorage.
Int32: The session timeout in seconds. The timeout is enforced on the client side.
Object: Application settings.
Boolean: Shows the loader animated gif while initializing the application.
String: The startup Main method.
String: Theme name.
Object: ThreadPool min/max configuration, null by default.
String: Url redirection.
Boolean: Verifies the client's unique id when retrieving a session. It prevents session hijacking over unsecured connections.
Boolean: Verifies that resource requests are received from the user's authorizes browser. Prevents reusing a resource URL from an unauthorized browser.
Int32: Sets the response size that triggers the compression of the response over the WebSocket channel.
Loads or retrieves the configuration file.
context
uri
Returns: Configuration.
Loads or retrieves the configuration file.
filePath
The full path to the .json file to load.
uri
Returns: Configuration.
LoadConfigurationEventHandler Fired when the system needs to load a Wisej configuration file.
An application can install a custom configuration handler and return a custom Configuration object. In alternative, the handler can change the value of FilePath and let Wisej.NET load the alternative json file. This is a static event and should be attached to before the application starts. One way to do that is to register an HttpModuleStartup method with IIS when using .NET 4.8. When running on .NET Core, attach to the event in the Startup method.
Wisej.Core.LoadConfigurationEventHandler
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Represents a method that handles the LoadConfiguration event.
sender
The source of the event. Always null.
args
The event data.
Fired when the system needs to load a Wisej configuration file.
Wisej.Core.ClientTheme
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Represents a Wisej theme.
You can create a new custom theme based on an existing theme, empty, or initialized from a JSON string.
You can alter any aspect of a theme by using the dynamic properties: Colors, Images, Fonts, Appearances, Settings, and Stylesheet. These properties, being dynamic, can support any field and any structure. To alter these properties in a way that doesn't break the theme, look at the theme's structure in the ThemeBuilder or a text editor. To save a custom theme you may convert it to a JSON string simply by calling the ToJSON extension method added to all objects by the Wisej framework.
Default private constructor.
name
Unique name of the theme.
Constructs a new theme from the name and JSON definition.
name
Unique name of the theme.
json
JSON definition of the theme.
Constructs a new theme from the base theme.
name
Unique name of the theme.
baseTheme
Original theme to copy into the new theme.
Object: Theme appearances.
This is a complex dynamic object with several child objects. The structure can get quite complicated. Before messing with the Appearances object, please study the structure of the themes using the ThemeBuilder or a text editor. Being a dynamic object, you can either create a new appearance or alter an existing appearance at any level.
Object: Theme colors.
You can add or change any color in the current theme:
String: The file path where the theme was loaded from. If it was loaded from embedded resources this is null.
Object: Theme fonts.
You can add or alter any font to the theme. The structure of the font definition can get complicated. Please refer to the existing themes and the ThemeBuilder to determine the structure to use. The simplest way is to change an existing theme font:
Object: Theme images.
You can add or change any theme image. Images in the theme are just URLs but can be defined in several ways:
Absolute URL An URL starting with http: or https: pointing to an image resource.
Relative URL An URL relative to the current site or relative to value of Images.baseUrl.
base64 A base64 encoded embedded image.
Boolean: Returns if the theme is a mixin.
String: The name of the theme.
String: Design time project root path.
Object: Theme settings.
The Settings property allows a theme to define certain internal properties. Currently these are the supported properties:
native-scrollbars Instructs Wisej.NET to use the native scrollbars instead of the themed scrollbars. Setting this property can have negative side effects for virtual scrolling widgets like the DataGridView. The default is false.
overlapped-scrollbars Instructs Wisej to layout the scrollbars over the content being scrolled, similar to Windows' fluent themes or mobiles. The default is false.
Object: Stylesheet rules embedded in the theme.
The Stylesheet property is a new theme property added since Wisej 2.0. It allows a theme to define a set of CSS rules, just as if Default.html specified a css file. This property has only one string array field: "rules". When the theme is rendered, the client library joins all the rules into a css string and creates a stylesheet loaded into the browser.
String: Design time or runtime theme path.
Merges the mixin theme extensions with the theme.
designMode
If designMode = true, the theme is regenerated from the original JSON string. At design time it is possible to change the extensions applied to an already loaded theme.
Optional list of theme mixins. If null, the default theme mixins are always applied.
Returns: ClientTheme.
Merges the mixin theme extensions with the theme.
mixins
List of mixins to apply to the theme.
designMode
If designMode = true, the theme is regenerated from the original JSON string. At design time it is possible to change the extensions applied to an already loaded theme.
Returns: ClientTheme.
Returns the resolved color defined in the theme for the specified appearance, property or style name and optionally the state.
appearance
The appearance path that identifies the component in the theme. Nested appearances can be specified using a forward slash: i.e. window/captionbar.
name
The name of the property or the style value to query.
The name of the state to query. It's optional. The default is "default".
Returns: Color. A Color representing the color in the theme.
Returns the resolved theme color from the color list.
name
The name of the color to resolve from the color list.
Returns: Color. A Color representing the color in the theme.
Returns the resolved font defined in the theme for the specified appearance, property name and optionally the state.
appearance
The appearance path that identifies the component in the theme. Nested appearances can be specified using a forward slash: i.e. window/captionbar.
name
The name of the property value to query.
The name of the state to query. It's optional. The default is "default".
Returns: Font. A Font representing the queried font or null if not found.
Returns the resolved font defined from the font list.
name
Returns: Font. A Font representing the queried font or null if not found.
Returns the resolved image defined in the theme for the specified appearance, property or style name and optionally the state.
appearance
The appearance path that identifies the component in the theme. Nested appearances can be specified using a forward slash: i.e. window/captionbar.
name
The name of the property or the style value to query.
The name of the state to query. It's optional. The default is "default".
Returns: Image. A Image representing the queried image or null if not found. SVG images at runtime always return null, they are resolved only at design time.
Returns the resolved image defined from the image list.
name
Returns: Image. A Image representing the queried image or null if not found. SVG images at runtime always return null, they are resolved only at design time.
Returns the size of the inset border and padding.
appearance
The name of the appearance in the theme. Child component appearances can be specified using the forward slash, i.e. "button/icon".
The state that defines the property. It can omitted, the default state is "default".
Whether to include padding in the insets dimension.
Returns: Padding. Dimension of the border and optionally the padding as a Padding value
Retrieves the ClientTheme from the cache or loads it from a file in the application /Themes directory or from the embedded resources in any loaded assembly marked with the assembly:WisejResourcesAttribute.
name
Name of the theme file or resource, without the path and the extension.
reload
True to force a full reload of the theme.
Returns: ClientTheme. A ClientTheme instance.
Retrieves the ClientTheme from the cache or loads it from a file in the application /Themes directory or from the embedded resources in any loaded assembly marked with the assembly:WisejResourcesAttribute.
name
Name of the theme file or resource, without the path and the extension.
Returns: ClientTheme. A ClientTheme instance.
Returns the property value for the specified name and state within the specified appearance key.
T
appearance
The name of the appearance in the theme. Child component appearances can be specified using the forward slash, i.e. "button/icon".
name
The name of the property to retrieve.
The state that defines the property. It can omitted, the default state is "default".
Returns: T. The typed value of the requested property, or default(T) if not found.
Returns the style value for the specified name and state within the specified appearance key.
T
appearance
The name of the appearance in the theme. Child component appearances can be specified using the forward slash, i.e. "button/icon".
name
The name of the property to retrieve.
The state that defines the property. It can omitted, the default state is "default".
Returns: T. The typed value of the requested style, or default(T) if not found.
Returns true if the color is a theme color.
color
Color to check.
Returns: Boolean. True if color is a theme color.
Since the theme may also define SystemColors, using IsThemeColor on a system color returns false, but the rendering on the browser will use the color in the theme, if defined.
Returns true if the font is a theme font.
font
Font to check.
Returns: Boolean. True if font is a theme font.
Theme fonts (font's with the OriginalFontName starting with "@") are always rendered using the definition in the theme for their size and style. However, an application may use a theme font and change the size and style. In this case, the OriginalFontName is the theme name without the "@". If the name of the font (which could be a system name like "Arial") matches a theme font, Wisej will use the theme font but it uses the size and style set by the application.
Returns the resolved Color with the proper RGB values. If the color specified in color is a theme color, the value is resolved from the current theme, otherwise the original color is returned.
color
Returns: Color. A Color instance with the resolved RGB values.
Returns the resolved Font from the theme font. If the font is a theme font, the value is resolved from current theme.
font
Returns: Font. A Font instance that can be used directly.
Allows an object to serialize itself.
Wisej.Core.ClientProfile
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Definition of the client device.
Default
Rectangle: The inner usable design rectangle. Used when the design skin is set.
String: Name of the skin used by the designer when this profile is active.
String: Device type.
Nullable<Boolean>: Device landscape mode.
Int32: Maximum screen width.
Int32: Maximum browser width.
Int32: Minimum screen width.
Int32: Minimum browser width.
String: Name of the profile.
String: User agent string.
Checks whether the profile is a valid match.
device
Device type: Mobile, Desktop, Tablet, ...
userAgent
User agent string.
browserSize
Browser (window) size.
screenSize
Screen size.
Returns: Boolean.
Wisej.Core.LoadConfigurationEventArgs
Namespace: Wisej.Core
Assembly: Wisej.Framework (4.0.0.0)
Specifies the event arguments for the LoadConfiguration event.
String: The full file path to the configuration file to load. Since 3.2.7
Code handling the LoadConfiguration event may set the this property and return null to let Wisej.NET load the configuration from the new file.
Boolean: When set to true, suppresses the caching of the custom Configuration object returned by the custom handler for the LoadConfiguration event.
Configuration objects are cached and retrieved using the FilePath as the key.
Uri: The current Uri representing the site being loaded. Since 3.2.7
Wisej.Web.Application RequestType
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.0.0.0)
Type of incoming request. Since 3.5.5
DataCount
Request to return the number of records available for a list control.
DataRead
Request to read a data pages for a list control.
Event
Request to process events from the browser.
Load
The application session is being loaded for the first time. See also .
Reload
The application session is being reloaded. See also .
Service
Service (or postback) request to the be processed by a implementation.
Returns the .
Wisej.Web.Application FormCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.0.0.0)
Holds the collection of all top-level application forms.
Int32: Returns the total number of currently open forms.
Form: Returns the form at the specified index.
Form: Returns the first form with the specified name, the search is case insensitive.
Adds a form to the collection.
form
Return whether the collection contains the specified form.
form
Returns: Boolean.
Returns an enumerator that iterates through the open forms.
Returns: IEnumerator.
Removes the specified form from the collection.
form
Wisej.Web.Application PageCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.0.0.0)
Holds the collection of all top-level application pages.
Int32: Returns the total number of currently open pages.
Page: Returns the page at the specified index.
Page: Returns the first page with the specified name, the search is case insensitive.
Adds the page to the collection.
page
Returns whether the collection contains the specified page.
page
Returns: Boolean.
Returns an enumerator that iterates through the open pages.
Returns: IEnumerator.
Removes the page from the collection,
page
Wisej.Web.LicenseErrorEventArgs
Wisej.Web.HashChangedEventArgs
Wisej.Web.ResponsiveProfileChangedEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.0.0.0)
Provides data for the event.
Initializes a new instance of the class.
: The new active profile.
: The previously active profile.
An object that implements the interface to add to the filter list.
fileName
ondownload
ondownload
ondownload
fileName
ondownload
ondownload
ondownload
A custom expression used to match the to find.
A custom expression used to match the list of objects to find.
culture
reference
builder
callback
mixins
target
A that occurred while processing the current request.
One of value that identifies the sound to play.
defaultValue
Previous .
New active .
An object that implements the interface to remove from the filter list.
The application context to update. It can be any Wisej component or the returned by the property .
reference
The application context to update. It can be any Wisej component or the returned by the property .
action
Returns an instance of the class that represents the "cookies" storage in the browser.
Returns an instance of the class that represents the "localStorage" object in the browser.
Returns an instance of the class that represents the "sessionStorage" object in the browser.
status
The current representing the site being loaded.
mixins
state
state
state
state
includePadding
The of the value to retrieve.
state
The of the value to retrieve.
state
The to resolve to a usable value.
The to resolve to a usable instance.
Returns the default singleton.
Represents a method that handles the event.
QXDesktop
Desktop platform by qooxdoo.
The platform provider.
sender
The source of the event.
e
A ResponsiveProfileChangedEventArgs that contains the event data.
Fired when the active responsive profile is changed.
Fired when the active responsive profile is changed.
Represents the method that will handle the Application.ResponsiveProfileChanged event.
sender
The source of the event.
e
A HashChangedEventArgs that contains the event data.
Fired when the hash part of the URL changes on the client side.
sender
Current application context.
e
A RequestEventArgs instance with the data for the event handlers.
Fired at the beginning of every request.
Fired at the end of every request.
sender
The source of the event.
e
A LicenseErrorEventArgs that contains the event data.
Fired when a license error occurs.
error
License error.
Represents the method that will handle the LicenseError event.
value
Initial hash value.
Represents the method that will handle the HashChanged event.
type
Type of the incoming request.
Represent a method that handles the BeginRequest, and EndRequest events. Since 3.5.5
oldValue
Previous ClientProfile.
newValue
New active ClientProfile.