|
10 | 10 | using net.openstack.Core.Domain; |
11 | 11 | using net.openstack.Core.Providers; |
12 | 12 | using net.openstack.Providers.Rackspace.Objects.Dns; |
13 | | - using net.openstack.Providers.Rackspace.Validators; |
14 | 13 | using Newtonsoft.Json.Linq; |
15 | 14 | using CancellationToken = System.Threading.CancellationToken; |
| 15 | + using HttpResponseCodeValidator = net.openstack.Providers.Rackspace.Validators.HttpResponseCodeValidator; |
| 16 | + using IHttpResponseCodeValidator = net.openstack.Core.Validators.IHttpResponseCodeValidator; |
16 | 17 | using JsonRestServices = JSIStudios.SimpleRESTServices.Client.Json.JsonRestServices; |
17 | | - using Thread = System.Threading.Thread; |
18 | 18 |
|
19 | 19 | /// <summary> |
20 | 20 | /// Provides an implementation of <see cref="IDnsService"/> for operating |
@@ -45,9 +45,23 @@ public class CloudDnsProvider : ProviderBase<IDnsService>, IDnsService |
45 | 45 | /// <param name="defaultRegion">The default region to use for calls that do not explicitly specify a region. If this value is <c>null</c>, the default region for the user will be used; otherwise if the service uses region-specific endpoints all calls must specify an explicit region.</param> |
46 | 46 | /// <param name="internalUrl"><c>true</c> to use the endpoint's <see cref="Endpoint.InternalURL"/>; otherwise <c>false</c> to use the endpoint's <see cref="Endpoint.PublicURL"/>.</param> |
47 | 47 | /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <c>null</c>, a new instance of <see cref="CloudIdentityProvider"/> is created using <paramref name="defaultIdentity"/> as the default identity.</param> |
48 | | - /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <c>null</c>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> |
49 | | - public CloudDnsProvider(CloudIdentity defaultIdentity, string defaultRegion, bool internalUrl, IIdentityProvider identityProvider, IRestService restService) |
50 | | - : base(defaultIdentity, defaultRegion, identityProvider, restService, HttpResponseCodeValidator.Default) |
| 48 | + public CloudDnsProvider(CloudIdentity defaultIdentity, string defaultRegion, bool internalUrl, IIdentityProvider identityProvider) |
| 49 | + : this(defaultIdentity, defaultRegion, internalUrl, identityProvider, null, null) |
| 50 | + { |
| 51 | + } |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// Initializes a new instance of the <see cref="CloudDnsProvider"/> class with |
| 55 | + /// the specified values. |
| 56 | + /// </summary> |
| 57 | + /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <c>null</c>, no default identity is available so all calls must specify an explicit identity.</param> |
| 58 | + /// <param name="defaultRegion">The default region to use for calls that do not explicitly specify a region. If this value is <c>null</c>, the default region for the user will be used; otherwise if the service uses region-specific endpoints all calls must specify an explicit region.</param> |
| 59 | + /// <param name="internalUrl"><c>true</c> to use the endpoint's <see cref="Endpoint.InternalURL"/>; otherwise <c>false</c> to use the endpoint's <see cref="Endpoint.PublicURL"/>.</param> |
| 60 | + /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <c>null</c>, a new instance of <see cref="CloudIdentityProvider"/> is created using <paramref name="defaultIdentity"/> as the default identity.</param> |
| 61 | + /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing synchronous REST requests. If this value is <c>null</c>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> |
| 62 | + /// <param name="httpStatusCodeValidator">The HTTP status code validator to use for synchronous REST requests. If this value is <c>null</c>, the provider will use <see cref="HttpResponseCodeValidator.Default"/>.</param> |
| 63 | + protected CloudDnsProvider(CloudIdentity defaultIdentity, string defaultRegion, bool internalUrl, IIdentityProvider identityProvider, IRestService restService, IHttpResponseCodeValidator httpStatusCodeValidator) |
| 64 | + : base(defaultIdentity, defaultRegion, identityProvider, restService, httpStatusCodeValidator) |
51 | 65 | { |
52 | 66 | _internalUrl = internalUrl; |
53 | 67 | } |
|
0 commit comments