-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from JSkimming/naming-refactor
Restructured classes for consistency
- Loading branch information
Showing
24 changed files
with
238 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace CloudFlare.NET | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <inheritdoc/> | ||
public partial class CloudFlareClient : IDnsRecordClient | ||
{ | ||
/// <inheritdoc/> | ||
public Task<CloudFlareResponse<IReadOnlyList<DnsRecord>>> GetDnsRecordsAsync( | ||
IdentifierTag zoneId, | ||
CancellationToken cancellationToken, | ||
DnsRecordGetParameters parameters = null, | ||
CloudFlareAuth auth = null) | ||
{ | ||
return _client.GetDnsRecordsAsync(zoneId, cancellationToken, auth ?? _auth, parameters); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public Task<IEnumerable<DnsRecord>> GetAllDnsRecordsAsync( | ||
IdentifierTag zoneId, | ||
CancellationToken cancellationToken, | ||
DnsRecordGetParameters parameters = null, | ||
CloudFlareAuth auth = null) | ||
{ | ||
if (zoneId == null) | ||
throw new ArgumentNullException(nameof(zoneId)); | ||
|
||
return GetAllPagedResultsAsync<DnsRecord, DnsRecordGetParameters, DnsRecordOrderTypes>( | ||
(ct, a, p) => _client.GetDnsRecordsAsync(zoneId, ct, a, p), | ||
cancellationToken, | ||
auth ?? _auth, | ||
100, | ||
parameters); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
namespace CloudFlare.NET | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <inheritdoc/> | ||
public partial class CloudFlareClient : IZoneClient | ||
{ | ||
/// <inheritdoc/> | ||
public Task<CloudFlareResponse<IReadOnlyList<Zone>>> GetZonesAsync( | ||
CancellationToken cancellationToken, | ||
ZoneGetParameters parameters = null, | ||
CloudFlareAuth auth = null) | ||
{ | ||
return _client.GetZonesAsync(cancellationToken, auth ?? _auth, parameters); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public Task<IEnumerable<Zone>> GetAllZonesAsync( | ||
CancellationToken cancellationToken, | ||
ZoneGetParameters parameters = null, | ||
CloudFlareAuth auth = null) | ||
{ | ||
return GetAllPagedResultsAsync<Zone, ZoneGetParameters, ZoneOrderTypes>( | ||
_client.GetZonesAsync, | ||
cancellationToken, | ||
auth ?? _auth, | ||
50, | ||
parameters); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public Task<Zone> GetZoneAsync( | ||
IdentifierTag zoneId, | ||
CancellationToken cancellationToken, | ||
CloudFlareAuth auth = null) | ||
{ | ||
return _client.GetZoneAsync(zoneId, cancellationToken, auth ?? _auth); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.