Updated generic resolution of Guid from config.
This commit is contained in:
@ -9,6 +9,12 @@
|
||||
|
||||
public T GetValue<T>(string key)
|
||||
{
|
||||
if (typeof(T).Equals(typeof(Guid)))
|
||||
{
|
||||
var guid = Guid.Parse(System.Environment.GetEnvironmentVariable(key));
|
||||
return (T)Convert.ChangeType(guid, typeof(T));
|
||||
}
|
||||
|
||||
return (T)Convert.ChangeType(System.Environment.GetEnvironmentVariable(key), typeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user