public Task Send(PublishContext <T> context, IPipe <PublishContext <T> > next) { if (context.TryGetPayload <ApplicationInsightsPayload>(out _)) { return(next.Send(context)); } context.GetOrAddPayload(() => new ApplicationInsightsPayload()); return(SendWithTelemetry(context, next)); }
public async Task Send(PublishContext <T> context, IPipe <PublishContext <T> > next) { context.GetOrAddPayload(() => _db); await next.Send(context); }