public static DataType ParseDataType(ITypeReference typeReference) { if (typeReference.IsList) { if (typeReference.GetEnumerableContentType().GetUnderlyingType() == typeof(byte)) { return(DataType.Binary); } throw new Exception(string.Format("Type not mapped: {0}.", typeReference)); } return(ParseDataType(typeReference.GetUnderlyingType())); }
public static string GetCodeStringForType(ITypeReference typeReference) { return(typeReference.IsList ? "System.Collections.Generic.List<" + typeReference.GetEnumerableContentType().GetUnderlyingType() + ">" : typeReference.GetUnderlyingType().ToString()); }