Exemplo n.º 1
0
        private static ICollection <string> GetAllMvcNames(TExpression expression)
        {
            ICollection <string> val = expression.UserData.GetData(AllMvcNamesKey);

            if (val == null)
            {
                ISolution solution       = expression.GetSolution();
                var       attributeNames = solution.GetComponent <MvcAttributeNames>();
                val = new HashSet <string>(attributeNames.AttributeClrNamesToWatch.SelectMany(
                                               typeName => solution.GetMembersByAttributeName(typeName.ShortName)), StringComparer.OrdinalIgnoreCase);
                expression.UserData.PutData(AllMvcNamesKey, val);
            }

            return(val);
        }