3using System.Threading.Tasks;
17 private readonly
string fileName;
19 private DateTime reportTimestamp = DateTime.MinValue;
30 this.fileName = Path.GetFullPath(
FileName);
47 if (this.parsedReport is
null || File.GetLastWriteTimeUtc(
this.fileName) >
this.reportTimestamp)
49 this.parsedReport =
new ReportFile(this.fileName);
50 this.reportTimestamp = File.GetLastWriteTimeUtc(this.fileName);
53 return this.parsedReport;
88 return Task.FromResult(
false);
91 return Task.FromResult(
true);
93 foreach (
string Privilege
in Report.Privileges)
95 if (!Caller.HasPrivilege(Privilege))
96 return Task.FromResult(
false);
99 return Task.FromResult(
true);
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
Abstract base class for commands executing a report.
Command to execute a report file.
Contains a parsed report, as defined in a report file.
string[] Privileges
Privileges required to execute the report.
Report node based on the contents of a report file.
ReportFileNode(string FileName, string NodeId, ReportNode Parent)
Report node based on the contents of a report file.
override Task< bool > CanViewAsync(RequestOrigin Caller)
If the node is visible to the caller.
ReportFile ParsedReport
Parsed report, or null if unable to parse report.
override Task< ExecuteReport > GetExecuteCommand()
Gets the command object to execute a report. If null is returned, the report node is just a group pla...
string FileName
Report file name.
Abstract base class for report nodes.
INode Parent
Parent Node, or null if a root node.
Tokens available in request.