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, tenant)
The value of the parámeter as boolean.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
The value of the parámeter as boolean.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
The value of the parámeter as integer.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
The value of the parámeter as integer.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
The value of the parámeter as string.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
The value of the parámeter as string.
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to retrive it's value. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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(tenant, includeStoredValues)
Name | Type | Summary |
---|---|---|
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant, 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. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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(tenant, includeStoredValues)
Name | Type | Summary |
---|---|---|
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant, 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. |
tenant | ITenant | The tenant to which the parameter belongs to. |
includeStoredValues | Boolean | Whether the values from the store must be included. |
Sets the value of the parameter.
public Void SetValue(name, value, tenant)
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to set it's value. |
value | String | The value to be set. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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, tenant)
Name | Type | Summary |
---|---|---|
name | String | The name of the parameter to set it's value. |
value | String | The value to be set. |
tenant | ITenant | The tenant to which the parameter belongs to. |
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. |