/// <summary> /// Initializes a new instance of the <see cref="ServerLaunchArguments"/> class /// with the specified server argument and collection of load balancers to initially /// add created servers to. /// </summary> /// <param name="server">A <see cref="ServerArgument"/> object containing the detailed arguments for launching a server.</param> /// <param name="loadBalancers">A collection of <see cref="LoadBalancerArgument"/> objects describing the load balancers to initially add created servers to.</param> /// <exception cref="ArgumentNullException">If <paramref name="server"/> is <see langword="null"/>.</exception> /// <exception cref="ArgumentException">If <paramref name="loadBalancers"/> contains any <see langword="null"/> values.</exception> public ServerLaunchArguments(ServerArgument server, IEnumerable<LoadBalancerArgument> loadBalancers) { if (server == null) throw new ArgumentNullException("server"); _server = server; if (loadBalancers != null) { _loadBalancers = loadBalancers.ToArray(); if (_loadBalancers.Contains(null)) throw new ArgumentException("loadBalancers cannot contain any null values", "loadBalancers"); } }
/// <summary> /// Initializes a new instance of the <see cref="ServerLaunchArguments"/> class /// with the specified server argument and collection of load balancers to initially /// add created servers to. /// </summary> /// <param name="server">A <see cref="ServerArgument"/> object containing the detailed arguments for launching a server.</param> /// <param name="loadBalancers">A collection of <see cref="LoadBalancerArgument"/> objects describing the load balancers to initially add created servers to.</param> /// <exception cref="ArgumentNullException">If <paramref name="server"/> is <see langword="null"/>.</exception> /// <exception cref="ArgumentException">If <paramref name="loadBalancers"/> contains any <see langword="null"/> values.</exception> public ServerLaunchArguments(ServerArgument server, IEnumerable <LoadBalancerArgument> loadBalancers) { if (server == null) { throw new ArgumentNullException("server"); } _server = server; if (loadBalancers != null) { _loadBalancers = loadBalancers.ToArray(); if (_loadBalancers.Contains(null)) { throw new ArgumentException("loadBalancers cannot contain any null values", "loadBalancers"); } } }
/// <summary> /// Initializes a new instance of the <see cref="ServerLaunchArguments"/> class /// with the specified server argument. /// </summary> /// <param name="server">A <see cref="ServerArgument"/> object containing the detailed arguments for launching a server.</param> public ServerLaunchArguments(ServerArgument server) : this(server, null) { }