Shaolinq.EnvironmentSubstitutor.GetVariable C# (CSharp) Method

GetVariable() private static method

private static GetVariable ( string name ) : string
name string
return string
		private static string GetVariable(string name)
		{
			var retval = Environment.GetEnvironmentVariable(name);

			if (retval == null)
			{
				var propertyInfo = typeof (Environment).GetProperty(name, BindingFlags.Static | BindingFlags.Public);

				if (propertyInfo != null)
				{
					retval = (string)propertyInfo.GetValue(null, null);
				}
			}

			return retval;
		}
	}
EnvironmentSubstitutor