// 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; }
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); }
/// <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)); }
public static IEssexInstaller InThisApplication(InstallerFactory installerFactory) { //throw new NotImplementedException(Assembly.GetCallingAssembly().ToString()); return(ApplicationAssemblies(Assembly.GetCallingAssembly(), installerFactory)); }
/// <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)); }
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; }
/// <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); }
public static IEssexInstaller InThisApplication(InstallerFactory installerFactory) { //throw new NotImplementedException(Assembly.GetCallingAssembly().ToString()); return ApplicationAssemblies(Assembly.GetCallingAssembly(), installerFactory); }
/// <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); }