Gorgon
Show / Hide Table of Contents

Interface IGorgonOptionBag

Provides a functionality for setting and reading various options from a defined option bag.

Inherited Members
IGorgonNamedObjectReadOnlyList<IGorgonOption>.KeysAreCaseSensitive
IGorgonNamedObjectReadOnlyList<IGorgonOption>.this[string]
IGorgonNamedObjectReadOnlyList<IGorgonOption>.Contains(string)
IGorgonNamedObjectReadOnlyList<IGorgonOption>.IndexOf(string)
IGorgonNamedObjectReadOnlyList<IGorgonOption>.IndexOf(IGorgonOption)
IGorgonNamedObjectReadOnlyList<IGorgonOption>.Contains(IGorgonOption)
IReadOnlyList<IGorgonOption>.this[int]
IReadOnlyCollection<IGorgonOption>.Count
IEnumerable<IGorgonOption>.GetEnumerator()
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 Source

GetOptionValue<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 optionName was not found.

| Edit this page View Source

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 optionName was not found.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonTreeLinqExtensions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonTreeLinqExtensions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonIReadOnlyListExtensions.Contains<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.CopyTo<T>(IReadOnlyList<T>, T[])
GorgonIReadOnlyListExtensions.FirstIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonIReadOnlyListExtensions.IndexOf<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.LastIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author