/// <summary>
        /// Update connection settings
        /// </summary>
        /// <param name="newConnectionSettings">The updated connection settings</param>
        /// <param name="oldConnectionSettings">The old connection settings</param>
        /// <returns></returns>
        private bool UpdateConnection(IConnectionSettings newConnectionSettings, IConnectionSettings oldConnectionSettings)
        {
            bool result = true;

            try
            {
                XDocument xmlDoc = XDocument.Load(FileAndFolderConstants.ConnectionSettingsConfigFile);

                // Get the original config entry (based on the old connection settings)
                var configEntry = (from c in xmlDoc.Element("Connections").Elements()
                                   where c.Attribute(nameof(oldConnectionSettings.Name)).Value == oldConnectionSettings.Name &&
                                   c.Attribute(nameof(oldConnectionSettings.Host)).Value == oldConnectionSettings.Host &&
                                   Convert.ToInt32(c.Attribute(nameof(oldConnectionSettings.Port)).Value) == oldConnectionSettings.Port
                                   select c).FirstOrDefault();

                if (configEntry != null)
                {
                    // Update the existing config entry with the new values
                    configEntry.Attribute(nameof(newConnectionSettings.Name)).Value           = newConnectionSettings.Name;
                    configEntry.Attribute(nameof(newConnectionSettings.Host)).Value           = newConnectionSettings.Host;
                    configEntry.Attribute(nameof(newConnectionSettings.ConnectionType)).Value = newConnectionSettings.ConnectionType.ToString();
                    configEntry.Attribute(nameof(newConnectionSettings.Port)).Value           = newConnectionSettings.Port.ToString();
                    configEntry.Attribute(nameof(newConnectionSettings.Timeout)).Value        = newConnectionSettings.Timeout.ToString();
                    configEntry.Attribute(nameof(newConnectionSettings.UserName)).Value       = newConnectionSettings.UserName;
                    configEntry.Attribute(nameof(newConnectionSettings.Password)).Value       = newConnectionSettings.Password;

                    xmlDoc.Save(FileAndFolderConstants.ConnectionSettingsConfigFile);

                    oldConnectionSettings.LoadFromXml(configEntry);
                }
            }
            catch (Exception ex)
            {
                // Extended properties
                Dictionary <string, object> extProps = new Dictionary <string, object>();
                extProps.Add("Connection", newConnectionSettings);
                // FtpLog-Exception
                //this.unityContainer.Resolve<ILoggingService>(ServiceNames.LoggingService).Write(ex, LoggingCategories.ConnectionManagementModule, 1, 1000, System.Diagnostics.TraceEventType.Error, "ConnectionManager :: Failed to delete a connection", extProps);
                // TODO: Show-Exeption
                System.Diagnostics.Debug.WriteLine(ex);

                result = false;
            }

            return(result);
        }