Interface IGorgonOptionBag
Provides a functionality for setting and reading various options from a defined option bag.
Inherited Members
Namespace: Gorgon.Configuration
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonOptionBag : IGorgonNamedObjectReadOnlyList<IGorgonOption>, IReadOnlyList<IGorgonOption>, IReadOnlyCollection<IGorgonOption>, IEnumerable<IGorgonOption>, IEnumerable
Methods
| Edit this page View SourceGetOptionValue<T>(string)
Function to retrieve the value for an option.
Declaration
T GetOptionValue<T>(string optionName)
Parameters
Type | Name | Description |
---|---|---|
string | optionName | The name of the option. |
Returns
Type | Description |
---|---|
T | The value stored with the option. |
Type Parameters
Name | Description |
---|---|
T | The type of data for the option. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Thrown when the option specified by the |
SetOptionValue<T>(string, T)
Function to assign a value for an option.
Declaration
void SetOptionValue<T>(string optionName, T value)
Parameters
Type | Name | Description |
---|---|---|
string | optionName | The name of the option. |
T | value | The value to assign to the option. |
Type Parameters
Name | Description |
---|---|
T | The type of data for the option. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Thrown when the option specified by the |