/// <summary> /// Extension method to help with scanning assemblies in the solution for handler types /// </summary> /// <param name="scanner"></param> public static void ScanForHandlers(this IAssemblyScanner scanner) { scanner.TheCallingAssembly(); scanner.AssemblyContainingType <IHandlerBase>(); scanner.AssembliesFromApplicationBaseDirectory(); scanner.AddAllTypesOf <IHandlerBase>(); }
static void ScannerConfiguration(IAssemblyScanner scanner) { scanner.TheCallingAssembly(); scanner.AssemblyContainingType(typeof(Secret)); scanner.SingleImplementationsOfInterface(); scanner.WithDefaultConventions(); // Using OnAddedPluginType doesn't make concrete types singletons by default. scanner.With(new SingletonConvention()); }
private void loadAssemblies(IAssemblyScanner obj) { obj.TheCallingAssembly(); obj.AssemblyContainingType <IProductRepository>(); // Core obj.Assembly("Infrastructure"); // the Infrastructure DLL obj.WithDefaultConventions(); obj.With(new ControllerConvention()); obj.LookForRegistries(); }
private static void FindAllStructureMapPlugins(IAssemblyScanner x) { x.AssemblyContainingType<Bootstrapper>(); x.TheCallingAssembly(); x.WithDefaultConventions(); }
public virtual void Initialize(IAssemblyScanner scan) { scan.AssemblyContainingType(GetType()); }
public virtual void Initialize(IAssemblyScanner scan) { scan.AssemblyContainingType(GetType()); }
protected override void GetAssemblies(IAssemblyScanner assembly) { assembly.AssemblyContainingType<Bootstrapper>(); assembly.TheCallingAssembly(); }
private static void Initialize(IAssemblyScanner scan) { scan.WithDefaultConventions(); scan.TheCallingAssembly(); scan.AssemblyContainingType(typeof(Microsoft.TeamFoundation.Client.TeamFoundationServer)); }
private static void AddDataDependency(IAssemblyScanner scan) { scan.AssemblyContainingType <IExpensesContext <decimal> >(); scan.AssemblyContainingType <IIncomeContext <decimal> >(); }
private static void AddBusinessDependency(IAssemblyScanner scan) { scan.AssemblyContainingType <IIncomeService>(); scan.AssemblyContainingType <IExpensesService>(); scan.AssemblyContainingType <IFinanceService <decimal> >(); }
public static void UseDefaultConventions <T>(IAssemblyScanner scan) { scan.AssemblyContainingType <T>(); scan.WithDefaultConventions(); }
private static void AddDataDependency(IAssemblyScanner scan) { scan.AssemblyContainingType <IDbContext>(); scan.AssemblyContainingType <IServiceContext <Service::ICommercialContract> >(); scan.AssemblyContainingType <IRepository <Kind> >(); scan.AssemblyContainingType <IRepository <State> >(); scan.AssemblyContainingType <IRepository <Country> >(); scan.AssemblyContainingType <IRepository <User> >(); scan.AssemblyContainingType <ICategoryRepository>(); scan.AssemblyContainingType <IRoleRepository>(); scan.AssemblyContainingType <Data.Services.IAreaService>(); scan.AssemblyContainingType <Data.Services.ICityService>(); scan.AssemblyContainingType <Data.Services.IAdDetailsService>(); scan.AssemblyContainingType <Data.Services.IAdService>(); scan.AssemblyContainingType <Data.Services.ICommercialService>(); scan.AssemblyContainingType <Data.Services.IMembershipService>(); scan.AssemblyContainingType <IAdContext>(); scan.AssemblyContainingType <IAdDetailsContext>(); scan.AssemblyContainingType <ICategoryContext>(); scan.AssemblyContainingType <IAreaContext>(); scan.AssemblyContainingType <ICityContext>(); scan.AssemblyContainingType <IMembershipContext>(); scan.AssemblyContainingType <IRoleContext>(); scan.AssemblyContainingType <ICommercialContext>(); scan.AssemblyContainingType <IDataContext <Country> >(); scan.AssemblyContainingType <IDataContext <Kind> >(); scan.AssemblyContainingType <IDataContext <State> >(); scan.AssemblyContainingType <IDataContext <User> >(); }
private static void AddBusinessDependency(IAssemblyScanner scan) { scan.AssemblyContainingType <ILogginService>(); scan.AssemblyContainingType <IAdDetailsService>(); scan.AssemblyContainingType <IAdService>(); scan.AssemblyContainingType <ICategoryService>(); scan.AssemblyContainingType <IAreaService>(); scan.AssemblyContainingType <ICityService>(); scan.AssemblyContainingType <IRoleService>(); scan.AssemblyContainingType <IMembershipService>(); scan.AssemblyContainingType <ICommercialService>(); scan.AssemblyContainingType <IEntityService <User> >(); scan.AssemblyContainingType <IEntityService <Country> >(); scan.AssemblyContainingType <IEntityService <Kind> >(); scan.AssemblyContainingType <IEntityService <State> >(); }
private static void AddGeneralDependency(IAssemblyScanner scan) { scan.AssemblyContainingType <ILoggerWrapper>(); scan.AssemblyContainingType <ICacheStorage>(); }