/// <summary>
        /// Initializes a new instance of the <see cref="CreateVirtualInterfaceRequest"/>
        /// class with the specified network ID.
        /// </summary>
        /// <param name="networkId">The network ID. This is obtained from <see cref="CloudNetwork.Id">CloudNetwork.Id</see>.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="networkId"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentException">If <paramref name="networkId"/> is empty.</exception>
        public CreateVirtualInterfaceRequest(string networkId)
        {
            if (networkId == null)
                throw new ArgumentNullException("networkId");
            if (string.IsNullOrEmpty(networkId))
                throw new ArgumentException("networkId cannot be empty");

            VirtualInterface = new CreateVirtualInterface(networkId);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateVirtualInterfaceRequest"/>
        /// class with the specified network ID.
        /// </summary>
        /// <param name="networkId">The network ID. This is obtained from <see cref="CloudNetwork.Id">CloudNetwork.Id</see>.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="networkId"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentException">If <paramref name="networkId"/> is empty.</exception>
        public CreateVirtualInterfaceRequest(string networkId)
        {
            if (networkId == null)
            {
                throw new ArgumentNullException("networkId");
            }
            if (string.IsNullOrEmpty(networkId))
            {
                throw new ArgumentException("networkId cannot be empty");
            }

            VirtualInterface = new CreateVirtualInterface(networkId);
        }