Table of Contents

Class ReportGeneratedInterceptorContext

Namespace
GroupeIsa.Neos.Application.Reports
Assembly
GroupeIsa.Neos.Application.Abstractions.dll

Represents the context provided to a report generated interceptor.

public class ReportGeneratedInterceptorContext
Inheritance
ReportGeneratedInterceptorContext
Inherited Members

Constructors

ReportGeneratedInterceptorContext(Guid, string, string, byte[], ReportRequestOrigin)

Initializes a new instance of the ReportGeneratedInterceptorContext class.

public ReportGeneratedInterceptorContext(Guid generationIdentifier, string templateName, string filenameToUse, byte[] reportContent, ReportRequestOrigin requestOrigin)

Parameters

generationIdentifier Guid

The unique identifier of the report generation.

templateName string

The name of the report template.

filenameToUse string

The filename to use for the generated report (without extension).

reportContent byte[]

The raw content of the generated PDF report.

requestOrigin ReportRequestOrigin

Indicates the origin of the report generation request.

Properties

Cancel

Gets or sets a value indicating whether the standard processing should be cancelled.

public bool Cancel { get; set; }

Property Value

bool

Remarks

When set to true, the standard post-generation processing (such as sending notifications or executing callbacks) will be skipped.

FilenameToUse

Gets the filename to use for the generated report (without the .pdf extension).

public string FilenameToUse { get; }

Property Value

string

GenerationIdentifier

Gets the unique identifier of the report generation.

public Guid GenerationIdentifier { get; }

Property Value

Guid

IsContentModified

Gets a value indicating whether the report content has been modified by an interceptor.

public bool IsContentModified { get; }

Property Value

bool

ReportContent

Gets the raw content of the generated PDF report as a read-only array.

public ReadOnlyArray<byte> ReportContent { get; }

Property Value

ReadOnlyArray<byte>

Remarks

To modify the report content, use the UpdateContent(byte[]) method.

RequestOrigin

Gets the origin of the report generation request.

public ReportRequestOrigin RequestOrigin { get; }

Property Value

ReportRequestOrigin

Remarks

  • Client: The report was requested by a user and a notification will be sent.
  • Server: The report was requested by server-side code and a callback method will be executed.

TemplateName

Gets the name of the report template.

public string TemplateName { get; }

Property Value

string

Methods

UpdateContent(byte[])

Updates the report content with a new PDF content.

public void UpdateContent(byte[] newContent)

Parameters

newContent byte[]

The new PDF content.

Exceptions

ArgumentNullException

Thrown when newContent is null.

ArgumentException

Thrown when newContent is empty.