Implements a service to get and set parameter values.
Initializes a new instance of ParameterService.
public Void ParameterService(parameterDataService, configurationService)
Name | Type | Summary |
---|---|---|
parameterDataService | ParameterDataService | |
configurationService | IParameterConfigurationService |
Gets a parameter value as boolean.
public Boolean GetBoolean(name)
The value of the parámeter as boolean.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Gets a parameter value as boolean.
public Task GetBooleanAsync(name)
The value of the parámeter as boolean.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Gets a parameter value as an integer.
public Int32 GetInteger(name)
The value of the parámeter as integer.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Gets a parameter value as an integer.
public Task GetIntegerAsync(name)
The value of the parámeter as integer.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Gets a parameter value as a string.
public String GetString(name)
The value of the parámeter as string.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Gets a parameter value as a string.
public Task GetStringAsync(name)
The value of the parámeter as string.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
WrongParameterTypeException | Thrown when the type of the parameter is not string. |
Returns a parameter tree as a DTO including the parameter values from the store is required.
public ParameterTreeNodeDto LoadParametersTree(includeStoredValues)
Name | Type | Summary |
---|---|---|
includeStoredValues | Boolean | Whether the values from the store must be included. |
Returns a parameter tree as a DTO including the parameter values from the store is required.
public ParameterTreeNodeDto LoadParametersTree(groupName, includeStoredValues)
A tree of parameters or null if the specified group does not exists.
Name | Type | Summary |
---|---|---|
groupName | String | Name of the group from where to start loading parameters. |
includeStoredValues | Boolean | Whether the values from the store must be included. |
Returns a parameter tree as a DTO including the parameter values from the store is required.
public Task LoadParametersTreeAsync(includeStoredValues)
Name | Type | Summary |
---|---|---|
includeStoredValues | Boolean | Whether the values from the store must be included. |
Returns a parameter tree as a DTO including the parameter values from the store is required.
public Task LoadParametersTreeAsync(groupName, includeStoredValues)
A tree of parameters or null if the specified group does not exists.
Name | Type | Summary |
---|---|---|
groupName | String | Name of the group from where to start loading parameters. |
includeStoredValues | Boolean | Whether the values from the store must be included. |
Sets the value of the parameter.
public Void SetValue(name, value)
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to set it's value. |
value | String | The value to be set. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
ParameterValueValidationException | Thrown when the value is not valid. |
Sets the value of the parameter.
public Task SetValueAsync(name, value)
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to set it's value. |
value | String | The value to be set. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when name is null or empty. |
ParameterDoesNotExistException | Thrown when the specified parameter does not exists. |
ParameterValueValidationException | Thrown when the value is not valid. |