Beispiel #1
0
 public ModuleManager(IocManager iocManager, ModuleFinder moduleFinder)
 {
    _modules = new ModuleCollection();
     _iocManager = iocManager;
     _moduleFinder = moduleFinder;
     //Logger = NullLogger.Instance;
 }
Beispiel #2
0
 public UnitOfWorkManager(IocManager iocResolver, ICurrentUnitOfWorkProvider currentUnitOfWorkProvider,
     IUnitOfWorkDefaultOptions defaultOptions)
 {
     _iocResolver = iocResolver;
     _currentUnitOfWorkProvider = currentUnitOfWorkProvider;
     _defaultOptions = defaultOptions;
 }
Beispiel #3
0
 public void RegisterDependencies()
 {
     var  LocalIocManager = new IocManager();
       // var drInstances = new List<IDependencyRegistrar>();
       // ITypeFinder typefinder = new TypeFinder();
       // var drTypes = typefinder.Find(e => e.BaseType == typeof(IDependencyRegistrar));
       // foreach(var drType in drTypes)
       //{
       //    //drInstances.Add((IDependencyRegistrar)Activator.CreateInstance(drType));
       //    LocalIocManager.Register(drType, DependencyLifeStyle.Transient);
       //}
 }
Beispiel #4
0
        void Application_Start(object sender, EventArgs e)
        {
            // 在应用程序启动时运行的代码

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            //初始化一个IOC容器

            _container = new WindsorContainer().Install(FromAssembly.This());
            var iocManager = new IocManager(_container);

            //完成IWindsorInstaller接口中的注册

            ControllerBuilder.Current.SetControllerFactory(new MyDefaultControllerFactory(iocManager));
            RegisterModel(iocManager);
        }
Beispiel #5
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
 }
 public override void Initialize()
 {
     IocManager.Register <FakeExternalAuthenticationSource>(DependencyLifeStyle.Transient);
 }
Beispiel #7
0
 public override void PreInitialize()
 {
     IocManager.AddConventionalRegistrar(new ZeroControllerConventionalRegistrar());
     IocManager.Register <StaticResourceConfig>();
 }
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(SprintTekCoreSharedModule).GetAssembly());
 }
 internal ConventionalRegistrationContext(Assembly assembly, IocManager iocManager, ConventionalRegistrationConfig config)
 {
     Assembly = assembly;
     IocManager = iocManager;
     Config = config;
 }
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(taskManagerCoreModule).GetAssembly());
 }
Beispiel #11
0
 public StartupConfiguration(IocManager iocManager)
 {
     IocManager = iocManager;
 }
Beispiel #12
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(L11_HelloWorkWebCoreModule).GetAssembly());
 }
Beispiel #13
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(AngularBlogEntityFrameworkModule).GetAssembly());
 }
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(PhonebookCore2EntityFrameworkModule).GetAssembly());
 }
Beispiel #15
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(FinancialBusinessSystemEntityFrameworkModule).GetAssembly());
 }
Beispiel #16
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(JiraDashboardWebHostModule).GetAssembly());
 }
Beispiel #17
0
        protected override ICache CreateCacheImplementation(string name)
        {
            var provider = IocManager.Resolve <IRedisCacheProvider>();

            return(new RedisCache(name, provider));
        }
Beispiel #18
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(GemStockpilesWebHostModule).GetAssembly());
 }
Beispiel #19
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(InfomationSystemWebHostModule).GetAssembly());
 }
Beispiel #20
0
 public override void PostInitialize()
 {
     IocManager.Resolve <ApplicationPartManager>()
     .AddApplicationPartsIfNotAddedBefore(typeof(LMSWebCoreModule).Assembly);
 }
 public DefaultUserContext(IPrincipalAccessor principalAccessor, IocManager iocManager, ILogger log)
 {
     _principalAccessor = principalAccessor;
     _iocManager        = iocManager;
     Log = log;
 }
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(WorkFlowDictionaryModule).GetAssembly());
 }
 public override void PostInitialize()
 {
     IocManager.Resolve <AppTimes>().StartupTime = Clock.Now;
 }
Beispiel #24
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(AbpProjectNameWebHostModule).GetAssembly());
 }
 public AuthorizationInterceptor(IocManager iocResolver)
 {
     _iocResolver = iocResolver;
 }
Beispiel #26
0
 public YBootstrapper(IocManager iocManager)
 {
     IocManager = iocManager;
 }
Beispiel #27
0
 public AdoUnitOfWork(IocManager iocManager)
 {
     _iocResolver = iocManager;
     _activeDbContexts = new Dictionary<Type, IDbContext>();
 }
Beispiel #28
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(FirstBoilerPlateAppWebHostModule).GetAssembly());
 }
Beispiel #29
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(AbpDemoTestModule).GetAssembly());
 }
Beispiel #30
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(CmsFeatureWebHostModule).GetAssembly());
 }
Beispiel #31
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(MCSMigratorModule).GetAssembly());
     ServiceCollectionRegistrar.Register(IocManager);
 }
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(MahjongWebMvcModule).GetAssembly());
 }
 public static void Initialize(IocManager iocManager)
 {
     iocManager.IocContainer.Kernel.ComponentRegistered += KernelOnComponentRegistered;
 }
Beispiel #34
0
 public override void Initialize()
 {
     IocManager.RegisterAssemblyByConvention(typeof(IdentityServerWithEfCoreDemoWebMvcModule).GetAssembly());
 }