/// <summary> /// Commons the constructor. /// </summary> /// <param name="staffID">The staff ID.</param> /// <param name="staffNumber">The staff number.</param> /// <param name="tCheckPath">The t check path.</param> /// <param name="timesheetPath">The timesheet path.</param> /// <param name="submitViaNotes">if set to <c>true</c> [submit via notes].</param> private void CommonConstructor(StaffID staffID, StaffNumber staffNumber, TCheckPath tCheckPath, TimesheetPath timesheetPath, bool submitViaNotes) { this.StaffID = staffID; this.StaffNumber = staffNumber; this.TCheckPath = tCheckPath; this.TimesheetPath = timesheetPath; this.SubmitViaNotes = submitViaNotes; }
/// <summary> /// Initializes a new instance of the <see cref="Settings" /> class. /// </summary> /// <param name="staffID">The staff ID.</param> /// <param name="staffNumber">The staff number.</param> /// <param name="tCheckPath">The t check path.</param> /// <param name="timesheetPath">The timesheet path.</param> /// <param name="submitViaNotes">if set to <c>true</c> [submit via notes].</param> /// <param name="smtpServer">The SMTP server.</param> /// <param name="port">The port.</param> /// <param name="emailUsername">The email username.</param> /// <param name="enableSSL">if set to <c>true</c> [enable SSL].</param> /// <param name="emailAddress">The email address.</param> /// <param name="password">The password.</param> public Settings(StaffID staffID, StaffNumber staffNumber, TCheckPath tCheckPath, TimesheetPath timesheetPath, bool submitViaNotes, SmtpServer smtpServer, Port port, EmailUsername emailUsername, bool enableSSL, EmailAddress emailAddress, SecureString password) { CommonConstructor(staffID, staffNumber, tCheckPath, timesheetPath, submitViaNotes); NotSubmitViaNotesConstructor(smtpServer, port, emailUsername, enableSSL, emailAddress); this.Password = Password; }
/// <summary> /// Initializes a new instance of the <see cref="Settings" /> class. /// </summary> /// <param name="staffID">The staff ID.</param> /// <param name="staffNumber">The staff number.</param> /// <param name="tCheckPath">The t check path.</param> /// <param name="timesheetPath">The timesheet path.</param> /// <param name="submitViaNotes">if set to <c>true</c> [submit via notes].</param> public Settings(StaffID staffID, StaffNumber staffNumber, TCheckPath tCheckPath, TimesheetPath timesheetPath, bool submitViaNotes) { CommonConstructor(staffID, staffNumber, tCheckPath, timesheetPath, submitViaNotes); NotSubmitViaNotesConstructor(new SmtpServer(), new Port(), new EmailUsername(), false, new EmailAddress()); }