Class WMApp
Global application object for the World Modeler Server application. It provides:
- Cache management
- Application configuration parameters
- Access to the HTTPContext
Inherited Members
Namespace: Quantellia.WMServer.App
Assembly: WMServer.dll
Syntax
public static class WMApp
Fields
DefaultCacheAbsoluteLifetime
Default absolute lifetime of server cache in seconds.
Declaration
public const double DefaultCacheAbsoluteLifetime = 86400
Field Value
Type | Description |
---|---|
double |
DefaultCacheSlidingLifetime
Default sliding lifetime of server cache in seconds.
Declaration
public const double DefaultCacheSlidingLifetime = 600
Field Value
Type | Description |
---|---|
double |
Properties
AppConfig
Get the application configuration.
Declaration
public static IConfiguration AppConfig { get; }
Property Value
Type | Description |
---|---|
IConfiguration |
HTTPContext
Get the current HTTP context
Declaration
public static HttpContext? HTTPContext { get; }
Property Value
Type | Description |
---|---|
HttpContext |
InstanceID
Get the Instance ID of this instance of World Modeler.
Declaration
public static string InstanceID { get; }
Property Value
Type | Description |
---|---|
string |
RequestURLHost
Get the protocol and host part of the request URL.
Declaration
public static string RequestURLHost { get; }
Property Value
Type | Description |
---|---|
string |
RequestURLPath
Get the protocol, host, and path part of the request URL.
Declaration
public static string RequestURLPath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetInstanceID()
Returns the Instance ID of the World Modeler application instance.
Declaration
public static string GetInstanceID()
Returns
Type | Description |
---|---|
string | Returns the Instance ID of the World Modeler application instance. |
Init(WebApplicationBuilder)
Initialize the WMApp static variables.
Declaration
public static void Init(WebApplicationBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
WebApplicationBuilder | builder |