public override Task <IQueryStream <TElement> > ExecuteQueryStreamedAsync <TElement>(TableQuery <TElement> query, TableRequestOptions requestOptions = null, OperationContext operationContext = null) { CallLogging.LogStart(proxyName, nameof(ExecuteQueryStreamedAsync), query, requestOptions, operationContext); return(LogOutcomeAsync <IQueryStream <TElement> >(async() => { IQueryStream <TElement> origStream = await original.ExecuteQueryStreamedAsync(query, requestOptions, operationContext); return new QueryStreamLoggingProxy <TElement>(origStream, string.Format("{0} QueryStream {1}", proxyName, queryStreamCount++)); }, (outcome) => CallLogging.LogEnd(proxyName, nameof(ExecuteQueryStreamedAsync), outcome, query, requestOptions, operationContext))); }
public override Task <IList <TElement> > ExecuteQueryAtomicAsync <TElement>(TableQuery <TElement> query, TableRequestOptions requestOptions = null, OperationContext operationContext = null) { // We could reduce this boilerplate if we used RealProxy, like // PSharpProxy does. But since we need a custom class anyway to // wrap the query stream, we pay this boilerplate rather than using // two proxies. CallLogging.LogStart(proxyName, nameof(ExecuteQueryAtomicAsync), query, requestOptions, operationContext); return(LogOutcomeAsync(() => original.ExecuteQueryAtomicAsync(query, requestOptions, operationContext), (outcome) => CallLogging.LogEnd(proxyName, nameof(ExecuteQueryAtomicAsync), outcome, query, requestOptions, operationContext))); }
public Task <TElement> ReadRowAsync() { CallLogging.LogStart(proxyName, nameof(ReadRowAsync)); return(LogOutcomeAsync(() => original.ReadRowAsync(), (outcome) => CallLogging.LogEnd(proxyName, nameof(ReadRowAsync), outcome))); }
public Task <PrimaryKey> GetContinuationPrimaryKeyAsync() { CallLogging.LogStart(proxyName, nameof(GetContinuationPrimaryKeyAsync)); return(LogOutcomeAsync(() => original.GetContinuationPrimaryKeyAsync(), (outcome) => CallLogging.LogEnd(proxyName, nameof(GetContinuationPrimaryKeyAsync), outcome))); }
public void Dispose() { CallLogging.LogStart(proxyName, nameof(Dispose)); LogOutcome(() => original.Dispose(), (outcome) => CallLogging.LogEnd(proxyName, nameof(Dispose), outcome)); }
public override Task <IList <TableResult> > ExecuteBatchAsync(TableBatchOperation batch, TableRequestOptions requestOptions = null, OperationContext operationContext = null) { CallLogging.LogStart(proxyName, nameof(ExecuteBatchAsync), batch, requestOptions, operationContext); return(LogOutcomeAsync(() => original.ExecuteBatchAsync(batch, requestOptions, operationContext), (outcome) => CallLogging.LogEnd(proxyName, nameof(ExecuteBatchAsync), outcome, batch, requestOptions, operationContext))); }