public static int GetMethodGenerity(IMethod method)
{
IConstructedMethodInfo constructedInfo = method.ConstructedInfo;
if (constructedInfo != null)
return constructedInfo.GenericArguments.Length;
IGenericMethodInfo genericInfo = method.GenericInfo;
if (genericInfo != null)
return genericInfo.GenericParameters.Length;
return 0;
}