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.Tasks.Process
Assembly: API.dll
Syntax
public interface IReportExecutor : IDisposable
Methods
ExecuteReport(IReportBase, Dictionary<String, Object>, String, Action<String>, ExecuteReportParameter)
Executes the specifed report
that inherits IReport and returns the generated file
Declaration
Task<(byte[] GeneratedReport, string GeneratedFileFormatExtension)> ExecuteReport(IReportBase report, Dictionary<string, object> parameters, string runID, Action<string> logMessage, ExecuteReportParameter taskParameter = null)
Parameters
Type | Name | Description |
---|---|---|
IReportBase | report | The report to execute |
System.Collections.Generic.Dictionary<System.String, System.Object> | parameters | The parameters provided, and evaluated, for executing this report |
System.String | runID | The unique run identification for this report |
System.Action<System.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 |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Byte[], System.String>> | 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 |
---|---|
System.Boolean | 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 |