mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-06 16:53:59 +00:00
sorting zone output list done.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user