예제 #1
0
 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()));
 }
예제 #2
0
 public static string GetCodeStringForType(ITypeReference typeReference)
 {
     return(typeReference.IsList ? "System.Collections.Generic.List<" + typeReference.GetEnumerableContentType().GetUnderlyingType() + ">" : typeReference.GetUnderlyingType().ToString());
 }