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

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

public FindActionsFromAssembly ( Assembly assembly ) : ControllerActionLocator
assembly System.Reflection.Assembly
Результат ControllerActionLocator
        public ControllerActionLocator FindActionsFromAssembly(Assembly assembly)
        {
            if (!assemblies.Contains(assembly))
            {
                FindActionsFrom(assembly.GetExportedTypes());
                assemblies.Add(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());
        }