C# Class Prototype.Service.Settings.Environment

This class retrives values from environment variables. If the requested variable is not found, then it will be pulled from the app config and set. This should allow the application to work with docker environment variables when run in a container, or app settings when run nativly in windows or whilst debugging or testing :-D
Inheritance: IEnvironment
Mostrar archivo Open project: radicalgeek/SampleMicroservice

Public Methods

Method Description
GetEnvironmentVariable ( string requestedVariable ) : string

Retrive an environment variable. If the variable dosn't exist it will be created and populated from the app config

GetServiceName ( ) : string
GetServiceVersion ( ) : int

Method Details

GetEnvironmentVariable() public method

Retrive an environment variable. If the variable dosn't exist it will be created and populated from the app config
public GetEnvironmentVariable ( string requestedVariable ) : string
requestedVariable string the Variable name
return string

GetServiceName() public method

public GetServiceName ( ) : string
return string

GetServiceVersion() public method

public GetServiceVersion ( ) : int
return int