Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Reports.ReportsDataSource Class Reference

Defines the Reports data source. This data source contains a tree structure of reports published by different modules running in memory. More...

Inheritance diagram for Waher.Reports.ReportsDataSource:
Waher.Things.IDataSource

Public Member Functions

 ReportsDataSource ()
 Defines the Reports data source. This data source contains a tree structure of reports published by different modules running in memory. More...
 
Task< string > GetNameAsync (Language Language)
 Gets the name of data source. More...
 
Task< bool > CanViewAsync (RequestOrigin Caller)
 If the data source is visible to the caller. More...
 
Task< INode > GetNodeAsync (IThingReference NodeRef)
 Gets the node, given a reference to it. More...
 

Static Public Member Functions

static async Task< bool > RegisterRootNode (ReportNode ReportRoot)
 Registers a new report root node. More...
 
static async Task< bool > RegisterReportNode (ReportNode ReportNode)
 Registers a new report node. More...
 

Static Public Attributes

const string SourceID = "Reports"
 Source ID for the reports data source. More...
 

Properties

IEnumerable< IDataSource > ChildSources [get]
 Child sources. If no child sources are available, null is returned. More...
 
bool HasChildren [get]
 If the source has any child sources. More...
 
DateTime LastChanged [get]
 When the source was last updated. More...
 
IEnumerable< INode > RootNodes [get]
 Root node references. If no root nodes are available, null is returned. More...
 

Events

EventHandlerAsync< SourceEvent > OnEvent = null
 Event raised when a data source event has been raised. More...
 

Detailed Description

Defines the Reports data source. This data source contains a tree structure of reports published by different modules running in memory.

Definition at line 15 of file ReportsDataSource.cs.

Constructor & Destructor Documentation

◆ ReportsDataSource()

Waher.Reports.ReportsDataSource.ReportsDataSource ( )

Defines the Reports data source. This data source contains a tree structure of reports published by different modules running in memory.

Definition at line 33 of file ReportsDataSource.cs.

Member Function Documentation

◆ CanViewAsync()

Task< bool > Waher.Reports.ReportsDataSource.CanViewAsync ( RequestOrigin  Caller)

If the data source is visible to the caller.

Parameters
CallerInformation about caller.
Returns
If the source is visible to the caller.

Implements Waher.Things.IDataSource.

Definition at line 74 of file ReportsDataSource.cs.

◆ GetNameAsync()

Task< string > Waher.Reports.ReportsDataSource.GetNameAsync ( Language  Language)

Gets the name of data source.

Parameters
LanguageLanguage to use.
Returns
Localized name of data source.

Implements Waher.Things.IDataSource.

Definition at line 64 of file ReportsDataSource.cs.

◆ GetNodeAsync()

Task< INode > Waher.Reports.ReportsDataSource.GetNodeAsync ( IThingReference  NodeRef)

Gets the node, given a reference to it.

Parameters
NodeRefNode reference.
Returns
Node, if found, null otherwise.

Implements Waher.Things.IDataSource.

Definition at line 157 of file ReportsDataSource.cs.

◆ RegisterReportNode()

static async Task< bool > Waher.Reports.ReportsDataSource.RegisterReportNode ( ReportNode  ReportNode)
static

Registers a new report node.

Parameters
ReportNodeReport node.
Returns
If the root node was registered.

Definition at line 116 of file ReportsDataSource.cs.

◆ RegisterRootNode()

static async Task< bool > Waher.Reports.ReportsDataSource.RegisterRootNode ( ReportNode  ReportRoot)
static

Registers a new report root node.

Parameters
ReportRootReport root node.
Returns
If the root node was registered.

Definition at line 98 of file ReportsDataSource.cs.

Member Data Documentation

◆ SourceID

const string Waher.Reports.ReportsDataSource.SourceID = "Reports"
static

Source ID for the reports data source.

Definition at line 20 of file ReportsDataSource.cs.

Property Documentation

◆ ChildSources

IEnumerable<IDataSource> Waher.Reports.ReportsDataSource.ChildSources
get

Child sources. If no child sources are available, null is returned.

Implements Waher.Things.IDataSource.

Definition at line 47 of file ReportsDataSource.cs.

◆ HasChildren

bool Waher.Reports.ReportsDataSource.HasChildren
get

If the source has any child sources.

Implements Waher.Things.IDataSource.

Definition at line 52 of file ReportsDataSource.cs.

◆ LastChanged

DateTime Waher.Reports.ReportsDataSource.LastChanged
get

When the source was last updated.

Implements Waher.Things.IDataSource.

Definition at line 57 of file ReportsDataSource.cs.

◆ RootNodes

IEnumerable<INode> Waher.Reports.ReportsDataSource.RootNodes
get

Root node references. If no root nodes are available, null is returned.

Implements Waher.Things.IDataSource.

Definition at line 82 of file ReportsDataSource.cs.

Event Documentation

◆ OnEvent

EventHandlerAsync<SourceEvent> Waher.Reports.ReportsDataSource.OnEvent = null

Event raised when a data source event has been raised.

Definition at line 145 of file ReportsDataSource.cs.


The documentation for this class was generated from the following file: