NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Page.DefaultPeerPageBuilder Class Reference
Inheritance diagram for Ntp.Analyzer.Page.DefaultPeerPageBuilder:
Collaboration diagram for Ntp.Analyzer.Page.DefaultPeerPageBuilder:

Public Member Functions

 DefaultPeerPageBuilder (Peer peer, PeerPageConfiguration config)
 
override Stream Generate ()
 

Public Attributes

override IEnumerable< StreamDestinationDestinations => config.Destinations.Destinations
 

Private Attributes

readonly PeerPageConfiguration config
 
readonly Peer peer
 

Additional Inherited Members

- Protected Member Functions inherited from Ntp.Analyzer.Page.PageBuilderBase
Stream ToStream (string text)
 
- Properties inherited from Ntp.Analyzer.Page.PageBuilderBase
abstract IEnumerable< StreamDestinationDestinations [get]
 
- Properties inherited from Ntp.Analyzer.Export.IStreamGenerator
IEnumerable< StreamDestinationDestinations [get]
 

Detailed Description

Definition at line 32 of file DefaultPeerPageBuilder.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Page.DefaultPeerPageBuilder.DefaultPeerPageBuilder ( Peer  peer,
PeerPageConfiguration  config 
)
inline

Definition at line 34 of file DefaultPeerPageBuilder.cs.

35  {
36  this.peer = peer;
37  this.config = config;
38  }

Member Function Documentation

override Stream Ntp.Analyzer.Page.DefaultPeerPageBuilder.Generate ( )
inlinevirtual

Implements Ntp.Analyzer.Page.PageBuilderBase.

Definition at line 45 of file DefaultPeerPageBuilder.cs.

46  {
47  // Create page
48  var peerPage = new DefaultPeerPageRender(config.WebPath, peer.Name);
51 
52  // Generate HTML
53  var htmlRender = new HtmlRenderer(peerPage);
54  string html = htmlRender.Render();
55 
56  return ToStream(html);
57  }
Uri WebPath
Gets the web path in the HostSubConfiguration.
Renders IHtmlObjects into plain text for display in browsers.
Definition: HtmlRenderer.cs:31
IEnumerable< GraphSetConfiguration > Graphs
Gets the graphs to be displayed on this page.
TimeServer Server
Definition: Peer.cs:42

Member Data Documentation

readonly PeerPageConfiguration Ntp.Analyzer.Page.DefaultPeerPageBuilder.config
private

Definition at line 40 of file DefaultPeerPageBuilder.cs.

override IEnumerable<StreamDestination> Ntp.Analyzer.Page.DefaultPeerPageBuilder.Destinations => config.Destinations.Destinations

Definition at line 43 of file DefaultPeerPageBuilder.cs.

readonly Peer Ntp.Analyzer.Page.DefaultPeerPageBuilder.peer
private

Definition at line 41 of file DefaultPeerPageBuilder.cs.


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