Ejemplo n.º 1
0
        private static string Canonicalize(Type type)
        {
            if (type == typeof(bool))
            {
                return(Boolean);
            }

            if (type == typeof(int))
            {
                return(Integer);
            }

            if (type == typeof(float) || type == typeof(double) || type == typeof(decimal))
            {
                return(Decimal);
            }

            if (type == typeof(DateTime))
            {
                return(Datetime);
            }

            if (SerializationUtilities.IsStringCompatible(type))
            {
                return(String);
            }

            return(type.FullName.Split(',').First());
        }