Boo.Lang.Compiler.TypeSystem.Generics.GenericsServices.GetMethodGenerity C# (CSharp) Method

GetMethodGenerity() public static method

public static GetMethodGenerity ( IMethod method ) : int
method IMethod
return int
        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;
        }