/// <summary> /// Initializes a new instance of the <see cref="LoadBalancerArgument"/> class /// with the specified load balancer ID and port. /// </summary> /// <param name="loadBalancerId">The ID of the load balancer to add new servers to. See <see cref="LoadBalancer.Id"/>.</param> /// <param name="port">The port used for the load balancer protocol. See <see cref="LoadBalancers.LoadBalancerConfiguration{TNodeConfiguration}.Port"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="loadBalancerId"/> is <see langword="null"/>.</exception> /// <exception cref="ArgumentOutOfRangeException">If <paramref name="port"/> is less than 0 or greater than 65535.</exception> public LoadBalancerArgument(LoadBalancerId loadBalancerId, int port) { if (loadBalancerId == null) throw new ArgumentNullException("loadBalancerId"); if (port <= 0 || port > 65535) throw new ArgumentOutOfRangeException("port"); _loadBalancerId = loadBalancerId; _port = port; }
/// <summary> /// Initializes a new instance of the <see cref="LoadBalancerArgument"/> class /// with the specified load balancer ID and port. /// </summary> /// <param name="loadBalancerId">The ID of the load balancer to add new servers to. See <see cref="LoadBalancer.Id"/>.</param> /// <param name="port">The port used for the load balancer protocol. See <see cref="LoadBalancers.LoadBalancerConfiguration{TNodeConfiguration}.Port"/>.</param> /// <exception cref="ArgumentNullException">If <paramref name="loadBalancerId"/> is <see langword="null"/>.</exception> /// <exception cref="ArgumentOutOfRangeException">If <paramref name="port"/> is less than 0 or greater than 65535.</exception> public LoadBalancerArgument(LoadBalancerId loadBalancerId, int port) { if (loadBalancerId == null) { throw new ArgumentNullException("loadBalancerId"); } if (port <= 0 || port > 65535) { throw new ArgumentOutOfRangeException("port"); } _loadBalancerId = loadBalancerId; _port = port; }