diff --git a/Ntp.Analyzer/Render/Host/HostLineRender.cs b/Ntp.Analyzer/Render/Host/HostLineRender.cs index cead46bb..51f2a1c2 100644 --- a/Ntp.Analyzer/Render/Host/HostLineRender.cs +++ b/Ntp.Analyzer/Render/Host/HostLineRender.cs @@ -4,7 +4,7 @@ // Author: // Carsten Sonne Larsen // -// Copyright (c) 2013 Carsten Sonne Larsen +// Copyright (c) 2013-2016 Carsten Sonne Larsen // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -66,29 +66,31 @@ namespace Ntp.Analyzer.Render.Host public override string Render() { - StringBuilder builder = new StringBuilder(); + StringBuilder builder = new StringBuilder (); - string name = Conf.Name.Substring(0, Conf.Name.Length > 18 ? 18 : Conf.Name.Length); + string name = Conf.Name.Substring (0, Conf.Name.Length > 18 ? 18 : Conf.Name.Length); string country = (Server != null ? Server.Country : String.Empty); string location = (Server != null ? Server.DisplayLocation : "Unknown"); - builder.Append("" + Peer.TallyChar + ""); - builder.Append("" + name + ""); - builder.Append(@"" + Peer.Stratus + ""); - builder.Append(@"" + Peer.LastPoll + ""); - builder.Append(@"" + Peer.Poll + ""); - builder.Append(@"" + Peer.Reach + ""); - builder.Append(@"" + Peer.Delay.ToString("0.000") + ""); - builder.Append(@"" + Peer.Offset.ToString("0.000") + ""); - builder.Append(@"" + Peer.Jitter.ToString("0.000") + ""); - builder.Append(@"" + country + ""); - builder.Append(@""); - builder.Append(location); - builder.AppendLine(""); - - return builder.ToString(); + builder.Append ("" + Peer.TallyChar + ""); + builder.Append ("" + name + ""); + builder.Append (@"" + Peer.Stratus + ""); + builder.Append (@"" + Peer.LastPoll + ""); + builder.Append (@"" + Peer.Poll + ""); + builder.Append (@"" + Peer.Reach + ""); + builder.Append (@"" + Peer.Delay.ToString ("0.000") + ""); + builder.Append (@"" + Peer.Offset.ToString ("0.000") + ""); + builder.Append (@"" + Peer.Jitter.ToString ("0.000") + ""); + if (Server != null) { + builder.Append (@"" + country + ""); + builder.Append (@""); + builder.Append (location); + builder.AppendLine (""); + } + + return builder.ToString (); } public override string RenderFooter()