Class Ambient
Provides access to process-global ambient context. Business app developers normally should not use this class
Inheritance
Inherited Members
Namespace: Azos
Assembly: Azos.dll
Syntax
public static class Ambient
Properties
CurrentCallUser
Returns the current call context user. The returned value is never null and returns fake user
Declaration
public static User CurrentCallUser { get; }
Property Value
Type | Description |
---|---|
User |
MemoryModel
Returns the memory utilization model for the application. This property is NOT configurable. It may be set at process entry point via a call to App.SetMemoryModel() before the app container spawns. Typical applications should not change the defaults. Some system service providers examine this property to allocate less cache and temp buffers in the memory-constrained environments
Declaration
public static Ambient.MemoryUtilizationModel MemoryModel { get; }
Property Value
Type | Description |
---|---|
Ambient.MemoryUtilizationModel |
Random
Returns process-wide random generator instance
Declaration
public static RandomGenerator Random { get; }
Property Value
Type | Description |
---|---|
RandomGenerator |
UTCNow
Shortcut access to ExecutionContext.Application.TimeSource.UTCNow;
Declaration
public static DateTime UTCNow { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
Methods
SetMemoryModel(Ambient.MemoryUtilizationModel)
Sets the memory utilization model for the whole app. This setting is NOT configurable. It may be set at process entry-point via a call to App.SetMemoryModel() before the app container spawns. Typical applications should not change the defaults. Some system service providers may examine this property to allocate less cache and temp buffers in the memory-constrained environments
Declaration
public static void SetMemoryModel(Ambient.MemoryUtilizationModel model)
Parameters
Type | Name | Description |
---|---|---|
Ambient.MemoryUtilizationModel | model |