Show / Hide Table of Contents

Class LambdaDictionarySource

The LambdaDictionarySource class is an implementation of ILambdaConfigSource interface that reads configuration values from a collection of key-value pairs. Nested sections are represented by a '/' character in the configuration key.

Inheritance
System.Object
LambdaDictionarySource
Implements
ILambdaConfigSource
Namespace: LambdaSharp.ConfigSource
Assembly: LambdaSharp.dll
Syntax
public sealed class LambdaDictionarySource : ILambdaConfigSource

Constructors

LambdaDictionarySource(IEnumerable<KeyValuePair<String, String>>)

The LambdaDictionarySource(IEnumerable<KeyValuePair<String, String>>) constructor creates a new LambdaDictionarySource instance from a collection of key-value pairs. Nested sections are represented by a '/' character in the configuration key.

Declaration
public LambdaDictionarySource(IEnumerable<KeyValuePair<string, string>> parameters)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> parameters

Collection of key-value pairs.

Methods

Open(String)

The Open(String) method returns an interface to read configuration values from the requested nested section. Section names are not case-sensitive.

Declaration
public ILambdaConfigSource Open(string name)
Parameters
Type Name Description
System.String name

The name of the nested section.

Returns
Type Description
ILambdaConfigSource

The ILambdaConfigSource implementation of the nested section.

Read(String)

The Read(String) method returns the configuration value of the specified key or null if the key does not exist. Configuration keys are not case-sensitive.

Declaration
public string Read(string key)
Parameters
Type Name Description
System.String key

The configuration key.

Returns
Type Description
System.String

The configuration value or null if the key does not exist.

ReadAllKeys()

The ReadAllKeys() method returns all defined configuration keys.

Declaration
public IEnumerable<string> ReadAllKeys()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

Enumeration of defined configuration keys.

Implements

ILambdaConfigSource
In This Article
Back to top Generated by DocFX