Class SimpleDataProvider
A simple IDataProvider implementation using a dictionary.
public class SimpleDataProvider : IDataProvider
- Inheritance
-
SimpleDataProvider
- Implements
- Inherited Members
Constructors
SimpleDataProvider(IDictionary<string, string>)
Initializes a new instance.
public SimpleDataProvider(IDictionary<string, string> values)
Parameters
valuesIDictionary<string, string>A dictionary holding variable names and their values.
Properties
VariableNames
Gets a collection of all available variable names.
public ICollection<CaseInsensitiveString> VariableNames { get; }
Property Value
- ICollection<CaseInsensitiveString>
Methods
GetValue(CaseInsensitiveString)
Gets the value of the specified variable.
public string GetValue(CaseInsensitiveString variableName)
Parameters
variableNameCaseInsensitiveStringThe name of the variable.
Returns
- string
The value of the variable, or
nullif the variable does not exist.
SetValue(CaseInsensitiveString, string)
Currently not supported.
public void SetValue(CaseInsensitiveString variableName, string value)
Parameters
variableNameCaseInsensitiveStringNot used.
valuestringNot used.
Remarks
Always throws a NotSupportedException.
Exceptions
- NotSupportedException
Always.