System.ZXParser.ReadValue C# (CSharp) Method

ReadValue() private static method

private static ReadValue ( string s, IZXPConverter converter, Type t, object &val ) : bool
s string
converter IZXPConverter
t Type
val object
return bool
        private static bool ReadValue(string s, IZXPConverter converter, Type t, 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 = ParseNew(s, t);
                return true;
            }
        }

Same methods

ZXParser::ReadValue ( string s, IZXPConverter converter, object &val ) : bool