Exemple #1
0
 public static void ReplaceService(this IPlusStartupConfiguration configuration, Type type, Type impl, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton)
 {
     configuration.ReplaceService(type, delegate
     {
         configuration.IocManager.Register(type, impl, lifeStyle);
     });
 }
Exemple #2
0
 public static void ReplaceService <TType, TImpl>(this IPlusStartupConfiguration configuration, DependencyLifeStyle lifeStyle = DependencyLifeStyle.Singleton) where TType : class where TImpl : class, TType
 {
     configuration.ReplaceService(typeof(TType), delegate
     {
         configuration.IocManager.Register <TType, TImpl>(lifeStyle);
     });
 }
Exemple #3
0
        public PlusRedisCacheOptions(IPlusStartupConfiguration plusStartupConfiguration)
        {
            PlusStartupConfiguration = plusStartupConfiguration;

            DatabaseId       = GetDefaultDatabaseId();
            ConnectionString = GetDefaultConnectionString();
        }
Exemple #4
0
 public static void ReplaceService <TType>(this IPlusStartupConfiguration configuration, Action replaceAction) where TType : class
 {
     configuration.ReplaceService(typeof(TType), replaceAction);
 }
Exemple #5
0
 public PlusModuleManager(IIocManager iocManager, IPlusStartupConfiguration startupConfiguration)
 {
     _iocManager           = iocManager;
     _startupConfiguration = startupConfiguration;
     Logger = NullLogger.Instance;
 }
Exemple #6
0
 public static IPlusAutoMapperConfiguration PlusAutoMapper(this IPlusStartupConfiguration configuration)
 {
     return(configuration.Get <IPlusAutoMapperConfiguration>());
 }
Exemple #7
0
 public DefaultConnectionStringResolver(IPlusStartupConfiguration configuration)
 {
     _configuration = configuration;
 }
        public CachingConfiguration(IPlusStartupConfiguration plusConfiguration)
        {
            PlusConfiguration = plusConfiguration;

            _configurators = new List <ICacheConfigurator>();
        }