23 using System.Collections.Generic;
31 namespace Ntp.Analyzer.Config.Node
50 IEnumerable<HostGraphConfiguration> hostGraphs,
51 IEnumerable<HostPageConfiguration> hostPages,
52 IEnumerable<PeerGraphConfiguration> peerGraphs,
53 IEnumerable<PeerPageConfiguration> peerPages,
54 IEnumerable<PeerSummaryPageConfiguration> peerSummaryPages,
55 IEnumerable<TrafficGraphConfiguration> trafficGraphs
60 ConfigFilePath = filePath;
61 AboutPage = aboutPage;
62 HostGraphPage = hostGraphPage;
63 HostIoStats = hostIoStats;
64 HostStats = hostStats;
66 PeerGraphPage = peerGraphPage;
67 PeerStats = peerStats;
68 DriftStats = driftStats;
69 this.serverName = serverName;
70 this.serverType = serverType;
71 this.hostPages =
new List<HostPageConfiguration>(hostPages);
72 this.hostGraphs =
new List<HostGraphConfiguration>(hostGraphs);
73 this.peerSummaryPages =
new List<PeerSummaryPageConfiguration>(peerSummaryPages);
74 this.peerPages =
new List<PeerPageConfiguration>(peerPages);
75 this.peerGraphs =
new List<PeerGraphConfiguration>(peerGraphs);
76 TrafficGraphs =
new List<TrafficGraphConfiguration>(trafficGraphs);
77 this.webPath = webPath;
78 webPathString = webPath?.OriginalString;
81 private readonly List<HostGraphConfiguration>
hostGraphs;
82 private readonly List<HostPageConfiguration>
hostPages;
83 private readonly List<PeerGraphConfiguration>
peerGraphs;
84 private readonly List<PeerPageConfiguration>
peerPages;
93 public int HostId {
get; }
97 public string ServerName => serverName ??
"localhost";
105 public string ConfigFilePath {
get; }
112 public override string FilePath => ConfigFilePath;
116 public string ConfigWebPath => webPathString ??
"/";
118 public Uri WebPath => webPath ??
new Uri(
"/", UriKind.Relative);
146 public IEnumerable<HostPageConfiguration> HostPages => hostPages;
154 public IEnumerable<PeerPageConfiguration> PeerPages => peerPages;
158 public IEnumerable<PeerSummaryPageConfiguration> PeerSummaryPages => peerSummaryPages;
166 public IEnumerable<HostGraphConfiguration> HostGraphs => hostGraphs;
170 public List<TrafficGraphConfiguration> TrafficGraphs {
get; }
174 public IEnumerable<PeerGraphConfiguration> PeerGraphs => peerGraphs;
readonly ServerType serverType
readonly string serverName
readonly List< PeerSummaryPageConfiguration > peerSummaryPages
readonly string webPathString
readonly List< PeerGraphConfiguration > peerGraphs
readonly List< HostGraphConfiguration > hostGraphs
readonly List< HostPageConfiguration > hostPages
readonly List< PeerPageConfiguration > peerPages
HostConfiguration(string configName, int hostId, string serverName, ServerType?serverType, string filePath, Uri webPath, AboutPageConfiguration aboutPage, HostGraphPageConfiguration hostGraphPage, StatConfiguration hostIoStats, StatConfiguration hostStats, MenuConfiguration menu, PeerGraphPageConfiguration peerGraphPage, StatConfiguration peerStats, DriftStatConfiguration driftStats, IEnumerable< HostGraphConfiguration > hostGraphs, IEnumerable< HostPageConfiguration > hostPages, IEnumerable< PeerGraphConfiguration > peerGraphs, IEnumerable< PeerPageConfiguration > peerPages, IEnumerable< PeerSummaryPageConfiguration > peerSummaryPages, IEnumerable< TrafficGraphConfiguration > trafficGraphs)