コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RackConnectService"/> class.
        /// </summary>
        /// <param name="authenticationProvider">The authentication provider.</param>
        /// <param name="region">The region.</param>
        public RackConnectService(IAuthenticationProvider authenticationProvider, string region)
        {
            if (authenticationProvider == null)
            {
                throw new ArgumentNullException("authenticationProvider");
            }
            if (string.IsNullOrEmpty(region))
            {
                throw new ArgumentException("region cannot be null or empty", "region");
            }

            RackspaceNet.Configure();

            _authenticationProvider = authenticationProvider;
            _urlBuilder             = new ServiceUrlBuilder(ServiceType.RackConnect, authenticationProvider, region);
        }
コード例 #2
0
 public RackConnectServiceTests()
 {
     RackspaceNet.ResetDefaults();
 }
コード例 #3
0
 public void Dispose()
 {
     RackspaceNet.ResetDefaults();
 }
コード例 #4
0
 public CloudNetworkServiceTests()
 {
     RackspaceNet.ResetDefaults();
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CloudNetworkService"/> class.
 /// </summary>
 /// <param name="authenticationProvider">The authentication provider.</param>
 /// <param name="region">The region.</param>
 public CloudNetworkService(OpenStack.Authentication.IAuthenticationProvider authenticationProvider, string region)
 {
     RackspaceNet.Configure();
     _networkingApiBuilder = new NetworkingApiBuilder(ServiceType.CloudNetworks, authenticationProvider, region, true);
 }