Пример #1
0
        public static List <LocalVariable> ComputeUnusedArguments(
            List <LocalVariable> argList,
            UseDefDescription useDef)
        {
            var allUsages       = useDef.GetAllUsedVariables();
            var stillUnused     = new List <LocalVariable>();
            var unusedArguments = new HashSet <LocalVariable>(argList);

            foreach (var unusedArgument in unusedArguments)
            {
                if (!allUsages.Contains(unusedArgument))
                {
                    stillUnused.Add(unusedArgument);
                }
            }
            return(stillUnused.ToList());
        }