Пример #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);
        }
Пример #2
0
 private static object AtomToInt(VM.Atom a)
 {
     return(((BYONDValue <int>)a).Value);
 }
Пример #3
0
 private static object AtomToFloat(VM.Atom a)
 {
     return(((BYONDValue <float>)a).Value);
 }
Пример #4
0
 private static object AtomToString(VM.Atom a)
 {
     return(((BYONDString)a).Value);
 }