/// <summary>
        ///
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="defaultRegion"></param>
        /// <param name="identityProvider"></param>
        /// <param name="restService"></param>
        /// <param name="cloudBlockStorageValidator"></param>
        /// <param name="isAdminMode"></param>
        internal CloudBlockStorageProvider(CloudIdentity identity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService, IBlockStorageValidator cloudBlockStorageValidator, bool isAdminMode)
            : base(identity, defaultRegion, identityProvider, restService, null, isAdminMode)
        {
            //if (cloudBlockStorageValidator == null)
            //    throw new ArgumentNullException("cloudBlockStorageValidator");

            _cloudBlockStorageValidator = cloudBlockStorageValidator ?? CloudBlockStorageValidator.Default;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloudBlockStorageProvider"/> class with
        /// the specified default identity, default region, identity provider, REST service
        /// implementation, and block storage validator.
        /// </summary>
        /// <param name="identity">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 with no default 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="cloudBlockStorageValidator">The <see cref="IBlockStorageValidator"/> to use for validating requests to this service.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="cloudBlockStorageValidator"/> is <see langword="null"/>.</exception>
        internal CloudBlockStorageProvider(CloudIdentity identity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService, IBlockStorageValidator cloudBlockStorageValidator)
            : base(identity, defaultRegion, identityProvider, restService)
        {
            if (cloudBlockStorageValidator == null)
            {
                throw new ArgumentNullException("cloudBlockStorageValidator");
            }

            _cloudBlockStorageValidator = cloudBlockStorageValidator;
        }
 internal CloudBlockStorageProvider(CloudIdentity identity, IIdentityProvider identityProvider, IRestService restService, IBlockStorageValidator cloudBlockStorageValidator)
     : base(identity, identityProvider, restService)
 {
     _cloudBlockStorageValidator = cloudBlockStorageValidator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudFilesProvider"/> class with
 /// the specified default identity, default region, identity provider, REST service
 /// implementation, and block storage validator.
 /// </summary>
 /// <param name="identity">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 with no default 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="cloudBlockStorageValidator">The <see cref="IBlockStorageValidator"/> to use for validating requests to this service.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="cloudBlockStorageValidator"/> is <see langword="null"/>.</exception>
 internal CloudBlockStorageProvider(CloudIdentity identity, string defaultRegion, IIdentityProvider identityProvider, IRestService restService, IBlockStorageValidator cloudBlockStorageValidator)
     : this(identity, defaultRegion, identityProvider, restService, cloudBlockStorageValidator, false)
 {
 }