ActionControllers.ControllerActionLocator.Where C# (CSharp) Метод

Where() публичный Метод

public Where ( bool>.Func predicate ) : ControllerActionLocator
predicate bool>.Func
Результат ControllerActionLocator
        public ControllerActionLocator Where(Func<Type, bool> predicate)
        {
            predicates.Add(predicate);
            return this;
        }

Usage Example

Пример #1
0
        public Dictionary <string, Type> Build()
        {
            var locator = new ControllerActionLocator(NamingConventions);

            if (FindAssemblyFromType != null)
            {
                locator = locator.FindActionsFromAssemblyContaining(FindAssemblyFromType);
            }

            if (CurrentAssembly)
            {
                locator = locator.FindActionsFromAssembly(FindTheCallingAssembly());
            }

            foreach (var predicate in Predicates)
            {
                locator.Where(predicate);
            }

            return(locator.Build());
        }