Example #1
0
 private Type CreateTypeFromDescription(PofTypeDescription desc)
 {
     if (!desc.HasGenericDefinition)
     {
         return(desc.First());
     }
     else
     {
         return(desc.First().MakeGenericType(desc.AfterFirst()));
     }
 }
 private Type CreateTypeFromDescription(PofTypeDescription desc)
 {
     if (!desc.HasGenericDefinition)
     {
         return(desc.First());
     }
     else
     {
         var genericArguments = desc.AfterFirst();
         if (genericArguments.All(x => x == typeof(void)))
         {
             return(desc.First());
         }
         else
         {
             return(desc.First().MakeGenericType(genericArguments));
         }
     }
 }