Ejemplo n.º 1
0
        /// <summary>
        /// Choosing option will direct StructureMap to *also* scan files ending in '*.exe'
        /// </summary>
        /// <param name="pathFilter"></param>
        public void AssembliesAndExecutablesFromApplicationBaseDirectory(Func <string, bool> pathFilter = null)
        {
            var assemblies = AssemblyFinder.FindAssemblies(null, includeExeFiles: true, pathFilter: pathFilter);

            foreach (var assembly in assemblies)
            {
                Assembly(assembly);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Choosing option will direct StructureMap to *also* scan files ending in '*.exe'
        /// </summary>
        /// <param name="assemblyFilter"></param>
        public void AssembliesAndExecutablesFromApplicationBaseDirectory(Func <Assembly, bool> assemblyFilter = null)
        {
            var assemblies = AssemblyFinder.FindAssemblies(assemblyFilter, includeExeFiles: true);

            foreach (var assembly in assemblies)
            {
                Assembly(assembly);
            }
        }
Ejemplo n.º 3
0
        public void AssembliesFromPath(string path)
        {
            var assemblies = AssemblyFinder.FindAssemblies(path, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            }, includeExeFiles: false);

            foreach (var assembly in assemblies)
            {
                Assembly(assembly);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Choosing option will direct StructureMap to *also* scan files ending in '*.exe'
        /// </summary>
        /// <param name="scanner"></param>
        /// <param name="assemblyFilter"></param>
        /// <param name="includeExeFiles"></param>
        public void AssembliesAndExecutablesFromApplicationBaseDirectory(Func <Assembly, bool> assemblyFilter = null)
        {
            var assemblies = AssemblyFinder.FindAssemblies(assemblyFilter, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            }, includeExeFiles: true);

            foreach (var assembly in assemblies)
            {
                Assembly(assembly);
            }
        }
Ejemplo n.º 5
0
        public static void AssembliesFromPath(this IAssemblyScanner scanner, string path)
        {
            var assemblies = AssemblyFinder.FindAssemblies(path, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            });

            foreach (var assembly in assemblies)
            {
                scanner.Assembly(assembly);
            }
        }
Ejemplo n.º 6
0
        public static void AssembliesFromApplicationBaseDirectory(this IAssemblyScanner scanner, Func <Assembly, bool> assemblyFilter)
        {
            var assemblies = AssemblyFinder.FindAssemblies(assemblyFilter, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            });

            foreach (var assembly in assemblies)
            {
                scanner.Assembly(assembly);
            }
        }
Ejemplo n.º 7
0
        public void AssembliesAndExecutablesFromPath(string path,
                                                     Func <Assembly, bool> assemblyFilter)
        {
            var assemblies = AssemblyFinder.FindAssemblies(path, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            }, includeExeFiles: true).Where(assemblyFilter);


            foreach (var assembly in assemblies)
            {
                Assembly(assembly);
            }
        }
        public static void AssembliesFromPath(this IAssemblyScanner scanner, string path,
                                              Func <Assembly, bool> assemblyFilter)
        {
            var assemblies = AssemblyFinder.FindAssemblies(path, txt =>
            {
                Console.WriteLine("StructureMap could not load assembly from file " + txt);
            }, includeExeFiles: false).Where(assemblyFilter);


            foreach (var assembly in assemblies)
            {
                scanner.Assembly(assembly);
            }
        }