Пример #1
0
        private static bool IsMethodUsed(
            MethodInfo method,
            Tuple <MethodInfo, MethodDeclaration>[]?testMethodsWithDeclaration,
            DebugLimitData?debugLimitData)
        {
            testMethodsWithDeclaration = DecompilerMethodHelper.FilterTestMethods(method, testMethodsWithDeclaration);
            if (testMethodsWithDeclaration == null)
            {
                return(false);
            }

            // ReSharper disable once InvertIf
            if (debugLimitData != null)
            {
                testMethodsWithDeclaration = DecompilerMethodHelper.DebugFilterMethod(debugLimitData, method, testMethodsWithDeclaration);
                if (testMethodsWithDeclaration == null)
                {
                    return(true);
                }
            }

            return(IsMethodUsedByAnyTestMethods(method, testMethodsWithDeclaration));
        }