diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-07-15 09:28:49 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-07-15 09:28:49 -0500 |
| commit | 4c52f877c197ef287f1afd36b25ade1bf65f0edb (patch) | |
| tree | 8d63261af6655ab83e6d47a8d834ce7e0421d7a1 /src/slskd/Integrations/FTP/FTPService.cs | |
| parent | 6376d1ed6f4bbae46e1dc4aecec36bfe5de044e8 (diff) | |
| download | slskd-4c52f877c197ef287f1afd36b25ade1bf65f0edb.tar.gz | |
use OptionsSnapshot for FTPService
Diffstat (limited to 'src/slskd/Integrations/FTP/FTPService.cs')
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
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. |
