Interface IReportGeneratedInterceptor
- Namespace
- GroupeIsa.Neos.Application.Reports
- Assembly
- GroupeIsa.Neos.Application.Abstractions.dll
Provides the functionalities of a report generated interceptor. Interceptors are invoked after a report has been generated and before the notification is sent to the user or the callback is executed.
public interface IReportGeneratedInterceptor
Remarks
Register your interceptor using the extension methods in ReportInterceptorServiceCollectionExtensions:
For a global interceptor (invoked for all templates):
services.AddReportGeneratedInterceptor<AuditReportInterceptor>();
For an interceptor specific to certain templates:
services.AddReportGeneratedInterceptor<InvoiceInterceptor>("Invoice", "OrderConfirmation");
Methods
OnReportGeneratedAsync(ReportGeneratedInterceptorContext, CancellationToken)
Called when a report has been generated.
Task OnReportGeneratedAsync(ReportGeneratedInterceptorContext context, CancellationToken cancellationToken)
Parameters
contextReportGeneratedInterceptorContextThe context containing information about the generated report. Use UpdateContent(byte[]) to modify the report content. Set Cancel to
trueto cancel the standard processing (notifications or callbacks will not be executed).cancellationTokenCancellationTokenCancellation token.