public static Type GetType(string typeName)
{
Contract.Requires<ArgumentNullException>(typeName != null);
Type result = Type.GetType(typeName, false);
if (result != null)
return result;
foreach (Assembly asm in Sage.Project.RelevantAssemblies)
{
result = asm.GetType(typeName, false);
if (result != null)
break;
}
if (typeName.IndexOf(",", StringComparison.Ordinal) != -1)
{
return Project.GetType(typeName.ReplaceAll(@",.*$", string.Empty));
}
return result;
}