Environment variables - adambajguz/Typin GitHub Wiki

To maintain testability and immutability of environment variables values while the application is running, Typin uses a special service IEnvironmentVariablesAccessor that can be used to access environment variables passed to CliApplication.RunAsync or read from the environment with Environment.GetEnvironmentVariables().

By default IEnvironmentVariablesAccessor is used in EnvironmentVariableFallbackProvider to provide an option fallback values when needed.

IEnvironmentVariablesAccessor is registered in DI container as singleton, and can be safely injected into any service.