diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPClientFactory.cs | 10 | ||||
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPService.cs | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/slskd/Integrations/FTP/FTPClientFactory.cs b/src/slskd/Integrations/FTP/FTPClientFactory.cs index 7c55195f..b0c136a0 100644 --- a/src/slskd/Integrations/FTP/FTPClientFactory.cs +++ b/src/slskd/Integrations/FTP/FTPClientFactory.cs @@ -31,10 +31,10 @@ namespace slskd.Integrations.FTP /// <summary> /// Initializes a new instance of the <see cref="FTPClientFactory"/> class. /// </summary> - /// <param name="optionsMonitor">The options monitor used to derive application options.</param> - public FTPClientFactory(IOptionsMonitor<Options> optionsMonitor) + /// <param name="optionsSnapshot">The options monitor used to derive application options.</param> + public FTPClientFactory(IOptionsSnapshot<Options> optionsSnapshot) { - Options = optionsMonitor.CurrentValue; + OptionsSnapshot = optionsSnapshot; try { @@ -49,8 +49,8 @@ namespace slskd.Integrations.FTP } private FtpEncryptionMode EncryptionMode { get; set; } - private FTPOptions FTPOptions => Options.Integration.FTP; - private Options Options { get; set; } + private FTPOptions FTPOptions => OptionsSnapshot.Value.Integration.FTP; + private IOptionsSnapshot<Options> OptionsSnapshot { get; set; } /// <summary> /// Creates an instance of <see cref="FtpClient"/>. diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs index 4b3f45ce..fdd04d56 100644 --- a/src/slskd/Integrations/FTP/FTPService.cs +++ b/src/slskd/Integrations/FTP/FTPService.cs @@ -36,22 +36,22 @@ namespace slskd.Integrations.FTP /// Initializes a new instance of the <see cref="FTPService"/> class. /// </summary> /// <param name="ftpClientFactory">The FTP client factory to use.</param> - /// <param name="optionsMonitor">The options monitor used to derive application options.</param> + /// <param name="optionsSnapshot">The options snapshot used to derive application options.</param> /// <param name="log">The logger.</param> public FTPService( IFTPClientFactory ftpClientFactory, - IOptionsMonitor<Options> optionsMonitor, + IOptionsSnapshot<Options> optionsSnapshot, ILogger<FTPService> log) { Factory = ftpClientFactory; - Options = optionsMonitor.CurrentValue; + OptionsSnapshot = optionsSnapshot; Log = log; } private IFTPClientFactory Factory { get; set; } - private FTPOptions FTPOptions => Options.Integration.FTP; + private FTPOptions FTPOptions => OptionsSnapshot.Value.Integration.FTP; private ILogger<FTPService> Log { get; set; } - private Options Options { get; } + private IOptionsSnapshot<Options> OptionsSnapshot { get; } /// <summary> /// Uploads the specified <paramref name="filename"/> to the configured FTP server. |
