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

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

public FindActionsFromAssemblyContaining ( Type type ) : ControllerActionLocator
type System.Type
Результат ControllerActionLocator
        public ControllerActionLocator FindActionsFromAssemblyContaining(Type type)
        {
            if (!assemblies.Contains(type.Assembly))
            {
                FindActionsFromAssembly(type.Assembly);
                assemblies.Add(type.Assembly);
            }

            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());
        }