NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender Class Reference
Inheritance diagram for Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender:
Collaboration diagram for Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender:

Public Member Functions

 DefaultPeerGraphRender (Uri webPath, string peerName, TimeServer server, IEnumerable< GraphSetConfiguration > graphs)
 
override string Render ()
 
override string RenderFooter ()
 
override string RenderHead ()
 
- Public Member Functions inherited from Ntp.Analyzer.Render.HtmlObjectRender
void Add (IHtmlObject child)
 

Private Attributes

readonly List< GraphSetConfigurationgraphs
 
readonly string peerName
 
readonly TimeServer server
 

Additional Inherited Members

- Public Attributes inherited from Ntp.Analyzer.Render.HtmlObjectRender
IEnumerable< IHtmlObjectChildren => children.ToArray()
 
- Protected Member Functions inherited from Ntp.Analyzer.Render.HtmlObjectRender
 HtmlObjectRender (Uri webPath)
 
- Properties inherited from Ntp.Analyzer.Render.HtmlObjectRender
Uri WebPath [get]
 
- Properties inherited from Ntp.Analyzer.Render.IHtmlObject
IEnumerable< IHtmlObjectChildren [get]
 
Uri WebPath [get]
 

Detailed Description

Definition at line 31 of file DefaultPeerGraphRender.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.DefaultPeerGraphRender ( Uri  webPath,
string  peerName,
TimeServer  server,
IEnumerable< GraphSetConfiguration graphs 
)
inline

Definition at line 33 of file DefaultPeerGraphRender.cs.

38  : base(webPath)
39  {
40  this.peerName = peerName;
41  this.server = server;
42  this.graphs = new List<GraphSetConfiguration>(graphs);
43  }
readonly List< GraphSetConfiguration > graphs

Member Function Documentation

override string Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.Render ( )
inline

Implements Ntp.Analyzer.Render.IHtmlObject.

Definition at line 50 of file DefaultPeerGraphRender.cs.

51  {
52  var builder = new StringBuilder();
53 
54  foreach (var graphSet in graphs)
55  {
56  foreach (var graph in graphSet.Graphs)
57  {
58  string name = server != null ? server.Name : peerName;
59  builder.Append(@"<br><img src=""");
60  builder.Append(graph.GetLink(graphSet, name).ToHtmlString());
61  builder.Append(@""" alt=""");
62  builder.Append(graph.GetAltName(graphSet, name));
63  builder.AppendLine(@"""><br>");
64  }
65  }
66 
67  return builder.ToString();
68  }
readonly List< GraphSetConfiguration > graphs
override string Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.RenderFooter ( )
inlinevirtual

Implements Ntp.Analyzer.Render.HtmlObjectRender.

Definition at line 70 of file DefaultPeerGraphRender.cs.

71  {
72  return string.Empty;
73  }
override string Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.RenderHead ( )
inlinevirtual

Implements Ntp.Analyzer.Render.HtmlObjectRender.

Definition at line 75 of file DefaultPeerGraphRender.cs.

76  {
77  return string.Empty;
78  }

Member Data Documentation

readonly List<GraphSetConfiguration> Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.graphs
private

Definition at line 45 of file DefaultPeerGraphRender.cs.

readonly string Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.peerName
private

Definition at line 47 of file DefaultPeerGraphRender.cs.

readonly TimeServer Ntp.Analyzer.Render.Peer.DefaultPeerGraphRender.server
private

Definition at line 48 of file DefaultPeerGraphRender.cs.


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