/// <summary> /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class /// using the provided values. /// </summary> /// <param name="urlBase">The base URL for the cloud instance. Predefined URLs are available in <see cref="PredefinedHpIdentityEndpoints"/>.</param> /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception> public HpIdentityProvider(Uri urlBase, CloudIdentity defaultIdentity, IRestService restService, ICache <UserAccess> tokenCache) : base(defaultIdentity, restService, tokenCache, urlBase) { if (urlBase == null) { throw new ArgumentNullException("urlBase"); } }
/// <summary> /// Initializes a new instance of the <see cref="CloudMonitoringProvider"/> class with /// the specified values. /// </summary> /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param> /// <param name="defaultRegion">The default region to use for calls that do not explicitly specify a region. If this value is <see langword="null"/>, 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> /// <param name="identityProvider">The identity provider to use for authenticating requests to this provider. If this value is <see langword="null"/>, a new instance of <see cref="CloudIdentityProvider"/> is created using <paramref name="defaultIdentity"/> as the default identity.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing synchronous REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="httpStatusCodeValidator">The HTTP status code validator to use for synchronous REST requests. If this value is <see langword="null"/>, the provider will use <see cref="HttpResponseCodeValidator.Default"/>.</param> protected CloudAutoScaleProvider(CloudIdentity defaultIdentity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService, IHttpResponseCodeValidator httpStatusCodeValidator) : base(defaultIdentity, defaultRegion, identityProvider, restService, httpStatusCodeValidator) { }
/// <summary> /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class /// using the <see cref="PredefinedHpIdentityEndpoints.Default"/> base URL and provided values. /// </summary> /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> public HpIdentityProvider(CloudIdentity defaultIdentity, IRestService restService, ICache <UserAccess> tokenCache) : this(PredefinedHpIdentityEndpoints.Default, defaultIdentity, restService, tokenCache) { }
/// <summary> /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class /// with no default identity, and the specified base URL, REST service /// implementation, and token cache. /// </summary> /// <param name="urlBase">The base URL for the cloud instance. Predefined URLs are available in <see cref="PredefinedHpIdentityEndpoints"/>.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception> public HpIdentityProvider(Uri urlBase, IRestService restService, ICache <UserAccess> tokenCache) : this(urlBase, null, restService, tokenCache) { }
/// <summary> /// Initializes a new instance of the <see cref="OpenStackIdentityProvider"/> class /// using the provided values. /// </summary> /// <param name="urlBase">The base URL for the cloud instance.</param> /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception> public OpenStackIdentityProvider(Uri urlBase, CloudIdentity defaultIdentity, IRestService restService, ICache<UserAccess> tokenCache) : base(defaultIdentity, restService, tokenCache, urlBase) { if (urlBase == null) throw new ArgumentNullException("urlBase"); }
/// <summary> /// Initializes a new instance of the <see cref="OpenStackIdentityProvider"/> class /// with no default identity, and the specified base URL, REST service /// implementation, and token cache. /// </summary> /// <param name="urlBase">The base URL for the cloud instance.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="urlBase"/> is <see langword="null"/>.</exception> public OpenStackIdentityProvider(Uri urlBase, IRestService restService, ICache<UserAccess> tokenCache) : this(urlBase, null, restService, tokenCache) { }
/// <summary> /// Initializes a new instance of the <see cref="HpIdentityProvider"/> class /// using the <see cref="PredefinedHpIdentityEndpoints.Default"/> base URL and provided values. /// </summary> /// <param name="defaultIdentity">The default identity to use for calls that do not explicitly specify an identity. If this value is <see langword="null"/>, no default identity is available so all calls must specify an explicit identity.</param> /// <param name="restService">The implementation of <see cref="IRestService"/> to use for executing REST requests. If this value is <see langword="null"/>, the provider will use a new instance of <see cref="JsonRestServices"/>.</param> /// <param name="tokenCache">The cache to use for caching user access tokens. If this value is <see langword="null"/>, the provider will use <see cref="UserAccessCache.Instance"/>.</param> public HpIdentityProvider(CloudIdentity defaultIdentity, IRestService restService, ICache<UserAccess> tokenCache) : this(PredefinedHpIdentityEndpoints.Default, defaultIdentity, restService, tokenCache) { }