Esempio n. 1
0
        public static object SimplifyProperty(Type type, VM.Atom a)
        {
            if (type == typeof(int))
            {
                return(AtomToInt(a));
            }
            if (type == typeof(float))
            {
                return(AtomToFloat(a));
            }
            if (type == typeof(string))
            {
                return(AtomToString(a));
            }
            if (type == typeof(VM.Atom))
            {
                return(a);
            }

            log.WarnFormat("Unable to simplify type {0}.", type.FullName);
            return(a);
        }
Esempio n. 2
0
 private static object AtomToInt(VM.Atom a)
 {
     return(((BYONDValue <int>)a).Value);
 }
Esempio n. 3
0
 private static object AtomToFloat(VM.Atom a)
 {
     return(((BYONDValue <float>)a).Value);
 }
Esempio n. 4
0
 private static object AtomToString(VM.Atom a)
 {
     return(((BYONDString)a).Value);
 }