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)); }
/// <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))); }