<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.10" />

MemoryConfigurationProvider

Provides configuration key-value pairs that are obtained from memory.

Initialize a new instance from the source.

public void Add(string key, string value)

Adds a new key-value pair.

public IEnumerator<KeyValuePair<string, string>> GetEnumerator()

Returns an enumerator that iterates through the collection.