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); }
private static object AtomToInt(VM.Atom a) { return(((BYONDValue <int>)a).Value); }
private static object AtomToFloat(VM.Atom a) { return(((BYONDValue <float>)a).Value); }
private static object AtomToString(VM.Atom a) { return(((BYONDString)a).Value); }