public bool SendOrders(Customer customer) { if (customer == null) throw new ArgumentNullException("customer"); if (customer.CustomerID <= 0) throw new ArgumentException( "Customer must be registered.", "customer"); if (string.IsNullOrEmpty(this.SmtpServerName)) throw new InvalidOperationException( "SMTP server name not initialized."); if (!NetworkInterface.GetIsNetworkAvailable()) throw new Exception("Network is not available."); // Implementation skipped... return HasErrors; }