Class ApplicationContext
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Represents a context containing application-wide settings.
Its scope is the application, meaning that there is only one instance accessible by all UI views.
[ExcludeFromCodeCoverage]
public static class ApplicationContext
- Inheritance
-
ApplicationContext
- Inherited Members
Properties
ClusterCompany
Gets the cluster company.
public static string ClusterCompany { get; }
Property Value
ClusterInProduction
Gets a value indicating whether the cluster is in production.
public static bool ClusterInProduction { get; }
Property Value
ClusterName
Gets the cluster name.
public static string ClusterName { get; }
Property Value
ClusterTitle
Gets the cluster title.
public static string ClusterTitle { get; }
Property Value
ClusterVersion
Gets the cluster version.
public static string ClusterVersion { get; }
Property Value
MenuItems
Gets the application menu items.
public static MenuItem[] MenuItems { get; }
Property Value
- MenuItem[]
UIDefaultBehavior
Gets the UI default behavior.
public static IUIViewBehavior UIDefaultBehavior { get; }
Property Value
UserCustomViewMode
Gets the UI default behavior.
[Obsolete("Specific property of the UICustomization module. This property will be removed in future versions.")]
public static UserCustomViewMode UserCustomViewMode { get; }
Property Value
UserEmail
Gets the user email.
public static string UserEmail { get; }
Property Value
UserFirstName
Gets the user first name.
public static string UserFirstName { get; }
Property Value
UserIdentifier
Gets the user identifier.
public static string UserIdentifier { get; }
Property Value
UserLastName
Gets the user last name.
public static string UserLastName { get; }
Property Value
Methods
Add(string, object)
Adds the specified key and value to the application context. If the key is already present, an exception is thrown.
public static void Add(string key, object value)
Parameters
AddApiContextValue(string, bool)
Adds a boolean value to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValueAsync instead.")]
public static Task AddApiContextValue(string key, bool value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValue(string, decimal)
Adds a decimal value to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValueAsync instead.")]
public static Task AddApiContextValue(string key, decimal value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValue(string, Guid)
Adds a GUID value to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValueAsync instead.")]
public static Task AddApiContextValue(string key, Guid value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValue(string, int)
Adds an integer value to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValueAsync instead.")]
public static Task AddApiContextValue(string key, int value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValue(string, string)
Adds a string value to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValueAsync instead.")]
public static Task AddApiContextValue(string key, string value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValueAsync(string, bool)
Adds a boolean value to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValueAsync(string key, bool value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValueAsync(string, decimal)
Adds a decimal value to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValueAsync(string key, decimal value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValueAsync(string, Guid)
Adds a GUID value to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValueAsync(string key, Guid value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValueAsync(string, int)
Adds an integer value to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValueAsync(string key, int value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValueAsync(string, string)
Adds a string value to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValueAsync(string key, string value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValues(string, bool[])
Adds boolean values to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValuesAsync instead.")]
public static Task AddApiContextValues(string key, bool[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValues(string, decimal[])
Adds decimal values to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValuesAsync instead.")]
public static Task AddApiContextValues(string key, decimal[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValues(string, Guid[])
Adds GUID values to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValuesAsync instead.")]
public static Task AddApiContextValues(string key, Guid[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValues(string, int[])
Adds integer values to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValuesAsync instead.")]
public static Task AddApiContextValues(string key, int[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValues(string, string[])
Adds string values to the API context. If the key is already present, an exception is thrown.
[Obsolete("Use AddApiContextValuesAsync instead.")]
public static Task AddApiContextValues(string key, string[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValuesAsync(string, bool[])
Adds boolean values to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValuesAsync(string key, bool[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValuesAsync(string, decimal[])
Adds decimal values to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValuesAsync(string key, decimal[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValuesAsync(string, Guid[])
Adds GUID values to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValuesAsync(string key, Guid[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValuesAsync(string, int[])
Adds integer values to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValuesAsync(string key, int[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddApiContextValuesAsync(string, string[])
Adds string values to the API context. If the key is already present, an exception is thrown.
public static Task AddApiContextValuesAsync(string key, string[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
AddListenerOnValueChanged<T>(string, Action<T>)
Adds a listener on the value changed event of the specified key.
public static void AddListenerOnValueChanged<T>(string key, Action<T> callback)
Parameters
keystringThe key to listen to.
callbackAction<T>The callback to be called when the value changes.
Type Parameters
TThe type of value.
ContainsKey(string)
Determines whether the application context contains the specified key.
public static bool ContainsKey(string key)
Parameters
keystringThe key to locate in the application context.
Returns
- bool
true if the application context contains an element with the specified key; otherwise, false.
GetApiContextValue<T>(string)
Gets the value associated with the specified key in the API context.
public static T GetApiContextValue<T>(string key)
Parameters
keystringThe key of the value to get.
Returns
- T
The value associated with the specified key if it exists; otherwise the default value.
Type Parameters
TThe type of the value.
GetApiContextValue<T>(string, T)
Gets the value associated with the specified key in the API context.
public static T GetApiContextValue<T>(string key, T defaultValue)
Parameters
keystringThe key of the value to get.
defaultValueTThe default value.
Returns
- T
The value associated with the specified key if it exists; otherwise the specified default value.
Type Parameters
TThe type of the value.
GetMenuItems(string)
Returns the menu items of the specified menu.
public static MenuItem[] GetMenuItems(string menuName)
Parameters
menuNamestringThe name of the menu to get menu items from.
Returns
- MenuItem[]
The table of menu items.
GetValue<T>(string)
Gets the value associated with the specified key.
public static T GetValue<T>(string key)
Parameters
keystringThe key of the value to get.
Returns
- T
The value associated with the specified key if it exists; otherwise the default value.
Type Parameters
TThe type of the value.
GetValue<T>(string, T)
Gets the value associated with the specified key.
public static T GetValue<T>(string key, T defaultValue)
Parameters
keystringThe key of the value to get.
defaultValueTThe default value.
Returns
- T
The value associated with the specified key if it exists; otherwise the specified default value.
Type Parameters
TThe type of the value.
Remove(string)
Removes the value with the specified key from the application context.
public static void Remove(string key)
Parameters
keystringThe key of the element to remove.
RemoveApiContextValue(string)
Removes the value with the specified key from the API context.
[Obsolete("Use RemoveApiContextValueAsync instead.")]
public static Task RemoveApiContextValue(string key)
Parameters
keystringThe key of the element to add.
Returns
- Task
A task that represents the asynchronous operation.
RemoveApiContextValueAsync(string)
Removes the value with the specified key from the API context.
public static Task RemoveApiContextValueAsync(string key)
Parameters
keystringThe key of the element to add.
Returns
- Task
A task that represents the asynchronous operation.
RemoveListenerOnValueChanged<T>(string, Action<T>)
Removes a listener on the value changed event of the specified key.
public static void RemoveListenerOnValueChanged<T>(string key, Action<T> callback)
Parameters
keystringThe key to listen to.
callbackAction<T>The callback to be called when the value changes.
Type Parameters
TThe type of value.
Set(string, object)
Sets the specified key and value to the application context.
public static void Set(string key, object value)
Parameters
SetApiContextValue(string, bool)
Sets a boolean value to the API context.
[Obsolete("Use SetApiContextValueAsync instead.")]
public static Task SetApiContextValue(string key, bool value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValue(string, decimal)
Sets a decimal value to the API context.
[Obsolete("Use SetApiContextValueAsync instead.")]
public static Task SetApiContextValue(string key, decimal value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValue(string, Guid)
Sets a GUID value to the API context.
[Obsolete("Use SetApiContextValueAsync instead.")]
public static Task SetApiContextValue(string key, Guid value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValue(string, int)
Sets an integer value to the API context.
[Obsolete("Use SetApiContextValueAsync instead.")]
public static Task SetApiContextValue(string key, int value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValue(string, string)
Sets a string value to the API context.
[Obsolete("Use SetApiContextValueAsync instead.")]
public static Task SetApiContextValue(string key, string value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValueAsync(string, bool)
Sets a boolean value to the API context.
public static Task SetApiContextValueAsync(string key, bool value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValueAsync(string, decimal)
Sets a decimal value to the API context.
public static Task SetApiContextValueAsync(string key, decimal value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValueAsync(string, Guid)
Sets a GUID value to the API context.
public static Task SetApiContextValueAsync(string key, Guid value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValueAsync(string, int)
Sets an integer value to the API context.
public static Task SetApiContextValueAsync(string key, int value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValueAsync(string, string)
Sets a string value to the API context.
public static Task SetApiContextValueAsync(string key, string value)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValues(string, bool[])
Sets boolean values to the API context.
[Obsolete("Use SetApiContextValuesAsync instead.")]
public static Task SetApiContextValues(string key, bool[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValues(string, decimal[])
Sets decimal values to the API context.
[Obsolete("Use SetApiContextValuesAsync instead.")]
public static Task SetApiContextValues(string key, decimal[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValues(string, Guid[])
Sets GUID values to the API context.
[Obsolete("Use SetApiContextValuesAsync instead.")]
public static Task SetApiContextValues(string key, Guid[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValues(string, int[])
Sets integer values to the API context.
[Obsolete("Use SetApiContextValuesAsync instead.")]
public static Task SetApiContextValues(string key, int[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValues(string, string[])
Sets string values to the API context.
[Obsolete("Use SetApiContextValuesAsync instead.")]
public static Task SetApiContextValues(string key, string[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValuesAsync(string, bool[])
Sets boolean values to the API context.
public static Task SetApiContextValuesAsync(string key, bool[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValuesAsync(string, decimal[])
Sets decimal values to the API context.
public static Task SetApiContextValuesAsync(string key, decimal[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValuesAsync(string, Guid[])
Sets GUID values to the API context.
public static Task SetApiContextValuesAsync(string key, Guid[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValuesAsync(string, int[])
Sets integer values to the API context.
public static Task SetApiContextValuesAsync(string key, int[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
SetApiContextValuesAsync(string, string[])
Sets string values to the API context.
public static Task SetApiContextValuesAsync(string key, string[] values)
Parameters
Returns
- Task
A task that represents the asynchronous operation.
TryGetValue(string, out object)
Tries to get the value associated with the specified key.
public static bool TryGetValue(string key, out object value)
Parameters
keystringThe key of the value to get.
valueobjectWhen this method returns, contains the value associated with the specified key, if the key is found; otherwise, null.
Returns
- bool
true if the application context contains an element with the specified key; otherwise, false.