sorting zone output list done.

This commit is contained in:
Shreyas Zare
2017-11-04 20:13:10 +05:30
parent 8ea18b2681
commit 80dee5974e
2 changed files with 14 additions and 1 deletions

View File

@@ -502,6 +502,8 @@ namespace DnsServerCore
string[] subZones = _dnsServer.CacheZoneRoot.ListSubZones(domain);
DnsResourceRecord[] records = _dnsServer.CacheZoneRoot.GetAllRecords(domain, false);
Array.Sort(subZones);
jsonWriter.WritePropertyName("zones");
jsonWriter.WriteStartArray();
@@ -529,6 +531,8 @@ namespace DnsServerCore
{
Zone.ZoneInfo[] zones = _dnsServer.AuthoritativeZoneRoot.ListAuthoritativeZones();
Array.Sort(zones);
jsonWriter.WritePropertyName("zones");
jsonWriter.WriteStartArray();

View File

@@ -824,7 +824,7 @@ namespace DnsServerCore
#endregion
public class ZoneInfo
public class ZoneInfo : IComparable<ZoneInfo>
{
#region variables
@@ -849,6 +849,15 @@ namespace DnsServerCore
#endregion
#region public
public int CompareTo(ZoneInfo other)
{
return this._zoneName.CompareTo(other._zoneName);
}
#endregion
#region properties
public string ZoneName