MemoryConfigurationProvider Class¶
In-memory implementation of Microsoft.Extensions.Configuration.IConfigurationProvider
- Namespace
Microsoft.Extensions.Configuration.Memory
- Assemblies
- Microsoft.Extensions.Configuration
Syntax¶
public class MemoryConfigurationProvider : ConfigurationProvider, IConfigurationProvider, IEnumerable<KeyValuePair<string, string>>, IEnumerable
-
class
Microsoft.Extensions.Configuration.Memory.
MemoryConfigurationProvider
Constructors¶
-
MemoryConfigurationProvider
(Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource)¶ Initialize a new instance from the source.
Arguments: source (Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource) – The source settings. public MemoryConfigurationProvider(MemoryConfigurationSource source)
-
Methods¶
-
Add
(System.String, System.String)¶ Add a new key and value pair.
Arguments: - key (System.String) – The configuration key.
- value (System.String) – The configuration value.
public void Add(string key, string value)
-
GetEnumerator
()¶ Returns an enumerator that iterates through the collection.
Return type: System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String>> Returns: An enumerator that can be used to iterate through the collection. public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
-
GetEnumerator
() Returns an enumerator that iterates through the collection.
Return type: System.Collections.IEnumerator Returns: An enumerator that can be used to iterate through the collection. IEnumerator IEnumerable.GetEnumerator()
-