private static bool ReadValue(string s, IZXPConverter converter, out object val)
{
string sFormatted = s.Trim();
switch(sFormatted.ToLower()) {
case "null":
val = null;
return true;
}
// We Found An Environment Key To Use
if(sFormatted.StartsWith("~~") && sFormatted.EndsWith("~~") && sFormatted.Length > 4) {
string sEnvKey = sFormatted.Substring(2, sFormatted.Length - 4);
return GetEnvironment(sEnvKey, out val);
}
// Try To Convert The Value
if(converter != null) return converter.Convert(s, out val);
else {
val = null;
return false;
}
}