Пример #1
0
 public CouchCacheProvider(ICacheProvider cache, IKeyAssociationManager keyAssociationManager,
                           ICacheKeyBuilder keyBuilder)
 {
     _cache              = cache;
     _keyBuilder         = keyBuilder;
     _associationManager = keyAssociationManager;
 }
Пример #2
0
        public CachedEventService(TimeSpan? ttl, ICacheClient client, ICacheKeyBuilder<Guid> keyBuilder, ILogFactory factory)
        {
            if (client == null) throw new ArgumentNullException("client");
            if (keyBuilder == null) throw new ArgumentNullException("keyBuilder");
            if (factory == null) throw new ArgumentNullException("factory");

            this.ttl = ttl;
            this.client = client;
            this.factory = factory;
            this.keyBuilder = keyBuilder;
        }
Пример #3
0
        /// <summary> Constructor.</summary>
        /// <param name="repository"> The calendar repository. </param>
        /// <param name="keyBuilder"></param>
        /// <param name="logFactory"> The factory instance to use for logging operations. </param>
        public CalendarWebService(ICalendarRepository repository, ICacheKeyBuilder<Guid> keyBuilder, ILogFactory logFactory)
        {
            if (repository == null) throw new ArgumentNullException(nameof(repository));
            if (keyBuilder == null) throw new ArgumentNullException(nameof(keyBuilder));
            if (logFactory == null) throw new ArgumentNullException(nameof(logFactory));

            this.repository = repository;
            this.logFactory = logFactory;
            this.keyBuilder = keyBuilder;
            nullkey = keyBuilder.NullKey.ToString();
        }
Пример #4
0
        public EventWebService(IEventRepository eventRepository, ICalendarRepository calendarRepository, ICacheKeyBuilder<Guid> keyBuilder, ILogFactory factory)
        {
            if (eventRepository == null) throw new ArgumentNullException("eventRepository");
            if (calendarRepository == null) throw new ArgumentNullException("calendarRepository");
            if (keyBuilder == null) throw new ArgumentNullException("keyBuilder");
            if (factory == null) throw new ArgumentNullException("factory");

            this.calendarRepository = calendarRepository;
            this.factory = factory;
            this.keyBuilder = keyBuilder;
            this.eventRepository = eventRepository;
        }
Пример #5
0
 public CacheService(ICacheKeyBuilder <TIntent> keyBuilder)
 {
     _keyBuilder = keyBuilder;
 }
Пример #6
0
 public void BuildCacheKey(ICacheKeyBuilder builder)
 {
     builder
     .By(Parameter1)
     .By(Parameter2);
 }
 public MemoryCacheService(ICacheKeyBuilder <TIntent> keyBuilder, IMemoryCache memoryCache) : base(keyBuilder)
 {
     _memoryCache = memoryCache;
 }