Пример #1
0
        public virtual void EvictCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> query)
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            query.EvictCachedResult(GetSyncQueryCache <TCacheEntryOptions>());
        }
Пример #2
0
        /// <inheritdoc cref="ISyncCacheManager.UpdateCachedResult{TCacheEntryOptions}"/>
        public virtual void UpdateCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> executedQuery)
        {
            if (executedQuery == null)
            {
                throw new ArgumentNullException(nameof(executedQuery));
            }

            Decorator.Decorate(GetOperationName(executedQuery, nameof(executedQuery.UpdateCachedResult)), () => executedQuery.UpdateCachedResult(GetSyncCacheStore <TCacheEntryOptions>()));
        }
Пример #3
0
        public virtual void UpdateCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> executedQuery)
        {
            if (executedQuery == null)
            {
                throw new ArgumentNullException(nameof(executedQuery));
            }

            executedQuery.UpdateCachedResult(GetSyncQueryCache <TCacheEntryOptions>());
        }
Пример #4
0
        /// <inheritdoc cref="ISyncQueryMediary.Query{TContext,TCacheEntryOptions,TResult}"/>
        public virtual TResult Query <TContext, TCacheEntryOptions, TResult>(ISyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, TContext context, CacheOption cacheOption)
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            return(Decorator.Decorate(GetOperationName(query, nameof(query.Execute)), () => query.Execute(context, GetSyncCacheStore <TCacheEntryOptions>(), cacheOption)));
        }
Пример #5
0
        public virtual TResult Query <TContext, TCacheEntryOptions, TResult>(ISyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, TContext context, CacheOption cacheOption = CacheOption.Default)
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            return(query.Execute(context, Decorator, GetSyncQueryCache <TCacheEntryOptions>(), cacheOption));
        }
Пример #6
0
 public virtual void UpdateCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> executedQuery)
 {
     Invoker.UpdateCachedResult(executedQuery);
 }
Пример #7
0
 public virtual void EvictCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> query)
 {
     Invoker.EvictCachedResult(query);
 }
Пример #8
0
 public virtual TResult Query <TContext, TResult, TCacheEntryOptions>(ISyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, CacheOption cacheOption = CacheOption.Default)
 {
     return(Invoker.Query(query, GetContext <TContext>(), cacheOption));
 }
Пример #9
0
 /// <inheritdoc cref="ISyncCacheManager.UpdateCachedResult{TCacheEntryOptions}"/>
 public virtual void UpdateCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> executedQuery) =>
 Mediary.UpdateCachedResult(executedQuery);
Пример #10
0
 /// <inheritdoc cref="ISyncCacheManager.EvictCachedResult{TCacheEntryOptions}"/>
 public virtual void EvictCachedResult <TCacheEntryOptions>(ISyncCachedQuery <TCacheEntryOptions> query) =>
 Mediary.EvictCachedResult(query);
Пример #11
0
 /// <inheritdoc cref="ISyncQueryMagneto.Query{TContext,TCacheEntryOptions,TResult}"/>
 public virtual TResult Query <TContext, TCacheEntryOptions, TResult>(ISyncCachedQuery <TContext, TCacheEntryOptions, TResult> query, CacheOption cacheOption) =>
 Mediary.Query(query, GetContext <TContext>(), cacheOption);