Interface IReportExecutor
An interface that must be implemented by every entity type that inherits IReport and marked with the ReportExecutorAttribute
This provides a mechanism for the UNIQUE_TASK_ID server task to process this type of report
Inherited Members
Namespace: LemonEdge.API.Core.Tasks.Processors
Assembly: LemonEdge.API.dll
Syntax
public interface IReportExecutor : IDisposable
Methods
ExecuteReport(IEntityUpdater, IReadOnlyCache, UserInfo, IReportBase, Dictionary<string, object>, string, Action<string>, ExecuteReportParameter)
Executes the specified report
that inherits IReport and returns the
generated file
Declaration
Task<(byte[] GeneratedReport, string GeneratedFileFormatExtension)> ExecuteReport(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, IReportBase report, Dictionary<string, object> parameters, string runID, Action<string> logMessage, ExecuteReportParameter taskParameter = null)
Parameters
Type | Name | Description |
---|---|---|
IEntityUpdater | updater | |
IReadOnlyCache | cache | |
UserInfo | user | |
IReportBase | report | The report to execute |
Dictionary<string, object> | parameters | The parameters provided, and evaluated, for executing this report |
string | runID | The unique run identification for this report |
Action<string> | logMessage | Used to log any messages when generating the report |
ExecuteReportParameter | taskParameter | The server task parameters for executing this report. Can be empty if running from a UNIQUE_TASK_ID server task |
Returns
Type | Description |
---|---|
Task<(byte[] GeneratedReport, string FileType)> | The newly generated report |
RequiresNewExecutor(IReportBase)
Returns true if the current instance of this report executor can not generate this report as it is already connected to a report service that is different
This ensures one IReportExecutor can be maintained for per connection, and indicates a new one is required for other connections
Declaration
bool RequiresNewExecutor(IReportBase report)
Parameters
Type | Name | Description |
---|---|---|
IReportBase | report | The report to execute |
Returns
Type | Description |
---|---|
bool | True if the current instance of this report executor can not generate this report as it is already connected to a report service that is different |