Пример #1
0
 // Methods
 public AssemblyInstaller(Assembly assembly, InstallerFactory factory)
 {
     if (assembly == null)
     {
         throw new ArgumentNullException("assembly");
     }
     if (factory == null)
     {
         throw new ArgumentNullException("factory");
     }
     this.assembly = assembly;
     this.factory = factory;
 }
Пример #2
0
 // Methods
 public AssemblyInstaller(Assembly assembly, InstallerFactory factory)
 {
     if (assembly == null)
     {
         throw new ArgumentNullException("assembly");
     }
     if (factory == null)
     {
         throw new ArgumentNullException("factory");
     }
     this.assembly = assembly;
     this.factory  = factory;
 }
Пример #3
0
        private static IEssexInstaller ApplicationAssemblies(Assembly rootAssembly, InstallerFactory installerFactory)
        {
            HashSet <Assembly> set       = new HashSet <Assembly>(ReflectionUtil.GetApplicationAssemblies(rootAssembly));
            CompositeInstaller installer = new CompositeInstaller();

            foreach (Assembly assembly in set)
            {
                if (assembly == typeof(FromAssembly).Assembly)
                {
                    continue;
                }
                installer.Add(Instance(assembly, installerFactory));
            }
            return(installer);
        }
Пример #4
0
        /// <summary>
        ///   Scans the assembly with specified name for types implementing <see cref = "IWindsorInstaller" />, instantiates using given <see
        ///    cref = "InstallerFactory" /> and returns so that <see cref = "IWindsorContainer.Install" /> can install them.
        /// </summary>
        /// <returns></returns>
        public static IEssexInstaller Named(string assemblyName, InstallerFactory installerFactory)
        {
            var assembly = ReflectionUtil.GetAssemblyNamed(assemblyName);

            return(Instance(assembly, installerFactory));
        }
Пример #5
0
 public static IEssexInstaller InThisApplication(InstallerFactory installerFactory)
 {
     //throw new NotImplementedException(Assembly.GetCallingAssembly().ToString());
     return(ApplicationAssemblies(Assembly.GetCallingAssembly(), installerFactory));
 }
Пример #6
0
 /// <summary>
 ///   Scans the specified assembly with specified name for types implementing <see cref = "IWindsorInstaller" />, instantiates using given <see
 ///    cref = "InstallerFactory" /> and returns so that <see cref = "IWindsorContainer.Install" /> can install them.
 /// </summary>
 /// <returns></returns>
 public static IEssexInstaller Instance(Assembly assembly, InstallerFactory installerFactory)
 {
     return(new AssemblyInstaller(assembly, installerFactory));
 }
Пример #7
0
 private static IEssexInstaller ApplicationAssemblies(Assembly rootAssembly, InstallerFactory installerFactory)
 {
     HashSet<Assembly> set = new HashSet<Assembly>(ReflectionUtil.GetApplicationAssemblies(rootAssembly));
     CompositeInstaller installer = new CompositeInstaller();
     foreach (Assembly assembly in set)
     {
         if (assembly == typeof(FromAssembly).Assembly)
         {
             continue;
         }
         installer.Add(Instance(assembly, installerFactory));
     }
     return installer;
 }
Пример #8
0
 /// <summary>
 ///   Scans the assembly with specified name for types implementing <see cref = "IWindsorInstaller" />, instantiates using given <see
 ///    cref = "InstallerFactory" /> and returns so that <see cref = "IWindsorContainer.Install" /> can install them.
 /// </summary>
 /// <returns></returns>
 public static IEssexInstaller Named(string assemblyName, InstallerFactory installerFactory)
 {
     var assembly = ReflectionUtil.GetAssemblyNamed(assemblyName);
     return Instance(assembly, installerFactory);
 }
Пример #9
0
 public static IEssexInstaller InThisApplication(InstallerFactory installerFactory)
 {
     //throw new NotImplementedException(Assembly.GetCallingAssembly().ToString());
      return ApplicationAssemblies(Assembly.GetCallingAssembly(), installerFactory);
 }
Пример #10
0
 /// <summary>
 ///   Scans the specified assembly with specified name for types implementing <see cref = "IWindsorInstaller" />, instantiates using given <see
 ///    cref = "InstallerFactory" /> and returns so that <see cref = "IWindsorContainer.Install" /> can install them.
 /// </summary>
 /// <returns></returns>
 public static IEssexInstaller Instance(Assembly assembly, InstallerFactory installerFactory)
 {
     return new AssemblyInstaller(assembly, installerFactory);
 }