3using System.Threading.Tasks;
24 [Page(1,
"Time", 150)]
26 [ToolTip(3,
"Search for records from this point in time.")]
27 public DateTime From = DateTime.Today.AddDays(-1);
29 [Page(1,
"Time", 150)]
31 [ToolTip(5,
"Search for records to this point in time.")]
32 public DateTime To = DateTime.Today.AddDays(1);
51 return Task.CompletedTask;
61 if (this.To < this.From)
63 DateTime Temp = this.To;
68 List<Filter> Filters =
new List<Filter>();
69 if (this.From > DateTime.MinValue)
72 if (this.To < DateTime.MaxValue)
77 IEnumerable<XmppStatistic> Records = Filters.Count
switch
80 1 => await
Database.
Find<XmppStatistic>(Filters[0],
"Timestamp"),
100 foreach (XmppStatistic Rec
in Records)
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task< IEnumerable< object > > Find(string Collection, params string[] SortOrder)
Finds objects in a given collection.
This filter selects objects that conform to all child-filters provided.
This filter selects objects that have a named field greater or equal to a given value.
This filter selects objects that have a named field lesser or equal to a given value.
ReportNode Report
Report node.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Abstract base class for commands executing a server administrator report.
override Task StartQueryExecutionAsync(Query Query, Language Language)
Starts the execution of a query.
override Task< string > GetNameAsync(Language Language)
Gets the displayable name of the command.
XmppStatisticsCommand(XmppProtocol Report)
Executes the XMPP Statistics report.
override ICommand Copy()
Creates a copy of the command object.
Defines a column in a table.
Class handling the reception of data from a query.
Task TableDone(string TableId)
Reports a table as being complete.
Task EndSection()
Ends a section. Each call to BeginSection(string) must be followed by a call to EndSection().
Task Start()
Starts query execution.
Task NewRecords(string TableId, params Record[] Records)
Reports a new set of records in a table.
Task BeginSection(string Header)
Begins a new section. Sections can be nested. Each call to BeginSection(string) must be followed by a...
Task NewTable(string TableId, string TableName, params Column[] Columns)
Defines a new table in the query output.
Task LogMessage(Exception Exception)
Logs an Exception as a query message.
async Task Done()
Query execution completed.
Task SetStatus(string Status)
Sets the current status of the query execution.
Task SetTitle(string Title)
Sets the title of the report.
Defines a record in a table.
ColumnAlignment
Column alignment.