コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CachedFooRepository"/> class.
        /// </summary>
        /// <param name="cacheDecoratorSettingsProvider">The cacheDecoratorSettingsProvider.</param>
        /// <param name="cacheProviderResolver">The cacheProviderResolver</param>
        /// <param name="fooRepository">The fooRepository</param>
        public CachedFooRepository(ICacheDecoratorSettingsProvider cacheDecoratorSettingsProvider,
                                   ICacheProviderResolver cacheProviderResolver,
                                   IFooRepository fooRepository)
            : base(cacheDecoratorSettingsProvider, cacheProviderResolver)
        {
            this.SetCacheProvider
            (
                cacheType: CacheTypeEnum.Memory,
                declaration: nameof(IFooRepository),
                implement: nameof(CachedFooRepository)
            );

            this.FooRepository = fooRepository;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RedisCacheRepositoryBase"/> class.
 /// </summary>
 /// <param name="cacheDecoratorSettingsProvider">The cacheDecoratorSettingsProvider.</param>
 /// <param name="cacheProviderResolver">The cacheProviderResolver.</param>
 public RedisCacheRepositoryBase(ICacheDecoratorSettingsProvider cacheDecoratorSettingsProvider,
                                 ICacheProviderResolver cacheProviderResolver)
     : base(cacheDecoratorSettingsProvider, cacheProviderResolver)
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CachedRepositoryBase"/> class.
 /// </summary>
 /// <param name="cacheDecoratorSettingsProvider">The cacheDecoratorSettingsProvider.</param>
 /// <param name="cacheProviderResolver">The cacheProviderResolver.</param>
 protected CachedRepositoryBase(ICacheDecoratorSettingsProvider cacheDecoratorSettingsProvider,
                                ICacheProviderResolver cacheProviderResolver)
 {
     this.CacheDecoratorSettingsProvider = cacheDecoratorSettingsProvider;
     this.CacheProviderResolver          = cacheProviderResolver;
 }