diff --git a/AutoTx/AutoTx.cs b/AutoTx/AutoTx.cs index ae74397e033e9066d7e672590e62e0a0ca6ba955..3b7f881956337a290e7ed010e3279fa537486cd9 100644 --- a/AutoTx/AutoTx.cs +++ b/AutoTx/AutoTx.cs @@ -242,7 +242,7 @@ namespace AutoTx /// <summary> /// Check if loaded configuration is valid, print a summary to the log. /// </summary> - public void CheckConfiguration() { + private void CheckConfiguration() { // non-critical / optional configuration parameters: if (!string.IsNullOrWhiteSpace(_config.SmtpHost)) SetupMailLogging(); @@ -481,7 +481,7 @@ namespace AutoTx /// <summary> /// Do the main tasks of the service, check system state, trigger transfers, ... /// </summary> - public void RunMainTasks() { + private void RunMainTasks() { // mandatory tasks, run on every call: SendLowSpaceMail(SystemChecks.CheckFreeDiskSpace(_config.SpaceMonitoring)); UpdateServiceState(); @@ -522,7 +522,7 @@ namespace AutoTx /// <summary> /// Check for transfers to be finished, resumed or newly initiated. /// </summary> - public void RunTransferTasks() { + private void RunTransferTasks() { // only proceed when in a valid state: if (_transferState != TxState.Stopped && _transferState != TxState.Paused) @@ -693,7 +693,7 @@ namespace AutoTx /// a subdirectory with the current date and time as its name to denote the timepoint /// when the grace period for this data starts. /// </summary> - public void MoveToGraceLocation() { + private void MoveToGraceLocation() { string errMsg; // CurrentTransferSrc is e.g. D:\ATX\PROCESSING\2017-04-02__12-34-56\user00 var sourceDirectory = new DirectoryInfo(_status.CurrentTransferSrc); diff --git a/AutoTx/Email.cs b/AutoTx/Email.cs index af291b57c128c368ec3f0074ce0fa68e588ae6d0..dc6b34dbd87ec10c5565b8ec91955f17d7db9610 100644 --- a/AutoTx/Email.cs +++ b/AutoTx/Email.cs @@ -16,7 +16,7 @@ namespace AutoTx /// <param name="recipient">A full email address OR a valid ActiveDirectory account.</param> /// <param name="subject">The subject, might be prefixed with a configurable string.</param> /// <param name="body">The email body.</param> - public void SendEmail(string recipient, string subject, string body) { + private void SendEmail(string recipient, string subject, string body) { subject = _config.EmailPrefix + subject; if (string.IsNullOrEmpty(_config.SmtpHost)) { Log.Debug("SendEmail: {0}\n{1}", subject, body); @@ -76,7 +76,7 @@ namespace AutoTx /// /// TODO: Once logging has stabilized we can probably safely remove this method again! /// </summary> - public void AdminDebugLog(string subject, string format, params object[] list) { + private void AdminDebugLog(string subject, string format, params object[] list) { var msg = string.Format(format, list); SendAdminEmail(msg, subject); msg = subject + "\n" + msg; @@ -88,7 +88,7 @@ namespace AutoTx /// </summary> /// <param name="body">The email text.</param> /// <param name="subject">Optional subject for the email.</param> - public void SendAdminEmail(string body, string subject = "") { + private void SendAdminEmail(string body, string subject = "") { if (_config.SendAdminNotification == false) return; @@ -117,7 +117,7 @@ namespace AutoTx /// Send a notification about low drive space to the admin. /// </summary> /// <param name="spaceDetails">String describing the drives being low on space.</param> - public void SendLowSpaceMail(string spaceDetails) { + private void SendLowSpaceMail(string spaceDetails) { if (string.IsNullOrWhiteSpace(spaceDetails)) return; @@ -153,7 +153,7 @@ namespace AutoTx /// Send a notification email to the file owner upon successful transfer. /// The recipient address is derived from the global variable CurrentTransferSrc. /// </summary> - public void SendTransferCompletedMail() { + private void SendTransferCompletedMail() { if (_config.SendTransferNotification == false) return; @@ -192,7 +192,7 @@ namespace AutoTx /// Send a notification email when a transfer has been interrupted before completion. /// Recipient address is derived from the global variable CurrentTransferSrc. /// </summary> - public void SendTransferInterruptedMail() { + private void SendTransferInterruptedMail() { if (_config.SendTransferNotification == false) return;