Files
messengerapi/code/MessengerApi.Configuration/Sources/Environment/EnvironmentConfigurationSource.cs
masiton 4393977389
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m3s
Build and Push Docker Image / docker (push) Successful in 43s
Initial commit carried over from private repo. This is V2.
2025-07-04 21:24:12 +02:00

15 lines
474 B
C#

namespace MessengerApi.Configuration.Sources.Environment
{
public class EnvironmentConfigurationSource : IEnvironmentConfigurationSource
{
public bool HasKey(string key)
{
return !string.IsNullOrWhiteSpace(System.Environment.GetEnvironmentVariable(key));
}
public T GetValue<T>(string key)
{
return (T)Convert.ChangeType(System.Environment.GetEnvironmentVariable(key), typeof(T));
}
}
}