private static bool HasDefaultConstructor(IType argument)
{
if (argument.IsValueType)
{
return true;
}
IConstructor[] constructors = argument.GetConstructors();
foreach (IConstructor ctor in constructors)
{
if (ctor.GetParameters().Length == 0)
{
return true;
}
}
return false;
}