Пример #1
0
 /// <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>();
 }
Пример #2
0
 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();
        }
Пример #4
0
 private static void FindAllStructureMapPlugins(IAssemblyScanner x)
 {
     x.AssemblyContainingType<Bootstrapper>();
      x.TheCallingAssembly();
      x.WithDefaultConventions();
 }
Пример #5
0
 public virtual void Initialize(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType(GetType());
 }
Пример #6
0
 public virtual void Initialize(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType(GetType());
 }
Пример #7
0
 protected override void GetAssemblies(IAssemblyScanner assembly)
 {
     assembly.AssemblyContainingType<Bootstrapper>();
     assembly.TheCallingAssembly();
 }
Пример #8
0
 private static void Initialize(IAssemblyScanner scan)
 {
     scan.WithDefaultConventions();
     scan.TheCallingAssembly();
     scan.AssemblyContainingType(typeof(Microsoft.TeamFoundation.Client.TeamFoundationServer));
 }
Пример #9
0
 private static void AddDataDependency(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType <IExpensesContext <decimal> >();
     scan.AssemblyContainingType <IIncomeContext <decimal> >();
 }
Пример #10
0
 private static void AddBusinessDependency(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType <IIncomeService>();
     scan.AssemblyContainingType <IExpensesService>();
     scan.AssemblyContainingType <IFinanceService <decimal> >();
 }
Пример #11
0
 public static void UseDefaultConventions <T>(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType <T>();
     scan.WithDefaultConventions();
 }
Пример #12
0
        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> >();
        }
Пример #13
0
        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> >();
        }
Пример #14
0
 private static void AddGeneralDependency(IAssemblyScanner scan)
 {
     scan.AssemblyContainingType <ILoggerWrapper>();
     scan.AssemblyContainingType <ICacheStorage>();
 }