Class ApplicationContext
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Represents the application context.
public static class ApplicationContext
- Inheritance
-
ApplicationContext
- Inherited Members
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
key
stringThe key to listen to.
callback
Action<T>The callback to be called when the value changes.
Type Parameters
T
The type of value.
ContainsKey(string)
Determines whether the application context contains the specified key.
public static bool ContainsKey(string key)
Parameters
key
stringThe 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
key
stringThe key of the value to get.
Returns
- T
The value associated with the specified key if it exists; otherwise the default value.
Type Parameters
T
The 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
key
stringThe key of the value to get.
defaultValue
TThe default value.
Returns
- T
The value associated with the specified key if it exists; otherwise the specified default value.
Type Parameters
T
The type of the value.
GetValue<T>(string)
Gets the value associated with the specified key.
public static T GetValue<T>(string key)
Parameters
key
stringThe key of the value to get.
Returns
- T
The value associated with the specified key if it exists; otherwise the default value.
Type Parameters
T
The 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
key
stringThe key of the value to get.
defaultValue
TThe default value.
Returns
- T
The value associated with the specified key if it exists; otherwise the specified default value.
Type Parameters
T
The type of the value.
Remove(string)
Removes the value with the specified key from the application context.
public static void Remove(string key)
Parameters
key
stringThe 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
key
stringThe 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
key
stringThe 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
key
stringThe key to listen to.
callback
Action<T>The callback to be called when the value changes.
Type Parameters
T
The 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
key
stringThe key of the value to get.
value
objectWhen 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.