示例#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);
 }