C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
Configuration.cs
Go to the documentation of this file.
1using System;
2
4{
5 public static class Configuration
6 {
12 public static T EnvVariable<T>(string name, T defaultValue)
13 {
14 string resolvedValue = Environment.ExpandEnvironmentVariables("%" + name + "%")
15 .Replace("%" + name + "%", defaultValue.ToString());
16 return (T)Convert.ChangeType(resolvedValue, typeof(T));
17 }
18 }
19}
static T EnvVariable< T >(string name, T defaultValue)
Resolve the environment variable if it exists, or use the default value.