From e141476ef5b6e13ec8de6cfe0d599595326ed28f Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 29 Jun 2021 22:14:57 -0500 Subject: cleanup --- src/slskd/Integrations/FTP/FTPClientFactory.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/slskd/Integrations/FTP/FTPClientFactory.cs') diff --git a/src/slskd/Integrations/FTP/FTPClientFactory.cs b/src/slskd/Integrations/FTP/FTPClientFactory.cs index 887623a2..7e6f948e 100644 --- a/src/slskd/Integrations/FTP/FTPClientFactory.cs +++ b/src/slskd/Integrations/FTP/FTPClientFactory.cs @@ -21,8 +21,15 @@ namespace slskd.Integrations.FTP using FluentFTP; using static slskd.Options.IntegrationOptions; + /// + /// FTP client factory. + /// public class FTPClientFactory : IFTPClientFactory { + /// + /// Initializes a new instance of the class. + /// + /// The options monitor used to derive application options. public FTPClientFactory(Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor) { Options = optionsMonitor.CurrentValue; @@ -33,15 +40,20 @@ namespace slskd.Integrations.FTP } catch (Exception ex) { - // Options should validate that the given string is parsable to FtpEncryptionMode through EnumAttribute; if this throws there's a bug somewhere. + // Options should validate that the given string is parsable to FtpEncryptionMode through EnumAttribute; if this + // throws there's a bug somewhere. throw new ArgumentException($"Failed to parse {typeof(FtpEncryptionMode).Name} from application Options. This is most likely a programming error; please file a GitHub issue and include your FTP configuration.", ex); } } - private Options Options { get; set; } - private FTPOptions FTPOptions => Options.Integration.FTP; private FtpEncryptionMode EncryptionMode { get; set; } + private FTPOptions FTPOptions => Options.Integration.FTP; + private Options Options { get; set; } + /// + /// Creates an instance of . + /// + /// The created instance. public FtpClient CreateFtpClient() { var client = new FtpClient(FTPOptions.Address, FTPOptions.Port, FTPOptions.Username, FTPOptions.Password); @@ -50,4 +62,4 @@ namespace slskd.Integrations.FTP return client; } } -} +} \ No newline at end of file -- cgit v1.2.3