/// <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); }
/// <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); }