/// <inheritdoc cref="ISyncQueryMediary.Query{TContext,TResult}"/> public virtual TResult Query <TContext, TResult>(ISyncQuery <TContext, TResult> query, TContext context) { 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))); }
/// <summary> /// Create new instance of <see cref="SyncRequestBase{T}"/> /// </summary> /// <param name="exchangeService">Exchange service.</param> /// <param name="syncQuery">Sync query.</param> internal SyncRequestBase(ExchangeService exchangeService, ISyncQuery syncQuery, Action <HttpRestUrl> httpRestUrlPreProcess) : base(exchangeService, httpRestUrlPreProcess) { ArgumentValidator.ThrowIfNull(syncQuery, nameof(syncQuery)); this.syncQuery = syncQuery; }
public virtual TResult Query <TContext, TResult>(ISyncQuery <TContext, TResult> query) { return(Invoker.Query(query, GetContext <TContext>())); }
/// <summary> /// Create new instance of <see cref="SyncRequestBase{T}"/> /// </summary> /// <param name="exchangeService">Exchange service.</param> /// <param name="syncQuery">Sync query.</param> internal SyncRequestBase(ExchangeService exchangeService, ISyncQuery syncQuery) : base(exchangeService) { ArgumentValidator.ThrowIfNull(syncQuery, nameof(syncQuery)); this.syncQuery = syncQuery; }
/// <inheritdoc cref="ISyncQueryMagneto.Query{TContext,TResult}"/> public virtual TResult Query <TContext, TResult>(ISyncQuery <TContext, TResult> query) => Mediary.Query(query, GetContext <TContext>());