diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-07-14 08:39:15 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-07-14 08:39:15 -0500 |
| commit | 3f5ebfde9be34a80a28dc8c08efaa4c9417184dc (patch) | |
| tree | 7992fdc442a9f65daf0ca603006bb1869a2a0442 /src/slskd/Integrations | |
| parent | c10a01c6d58ca71ec629d08998bea47698a1d3c2 (diff) | |
| download | slskd-3f5ebfde9be34a80a28dc8c08efaa4c9417184dc.tar.gz | |
simplify using for microsoft Options
Diffstat (limited to 'src/slskd/Integrations')
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPClientFactory.cs | 4 | ||||
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPService.cs | 4 | ||||
| -rw-r--r-- | src/slskd/Integrations/Pushbullet/PushbulletService.cs | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/slskd/Integrations/FTP/FTPClientFactory.cs b/src/slskd/Integrations/FTP/FTPClientFactory.cs index cc076ca1..7c55195f 100644 --- a/src/slskd/Integrations/FTP/FTPClientFactory.cs +++ b/src/slskd/Integrations/FTP/FTPClientFactory.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> +using Microsoft.Extensions.Options; + namespace slskd.Integrations.FTP { using System; @@ -30,7 +32,7 @@ namespace slskd.Integrations.FTP /// 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(Microsoft.Extensions.Options.IOptionsMonitor<Options> optionsMonitor) + public FTPClientFactory(IOptionsMonitor<Options> optionsMonitor) { Options = optionsMonitor.CurrentValue; diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs index a5fe6a8f..4b3f45ce 100644 --- a/src/slskd/Integrations/FTP/FTPService.cs +++ b/src/slskd/Integrations/FTP/FTPService.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> +using Microsoft.Extensions.Options; + namespace slskd.Integrations.FTP { using System; @@ -38,7 +40,7 @@ namespace slskd.Integrations.FTP /// <param name="log">The logger.</param> public FTPService( IFTPClientFactory ftpClientFactory, - Microsoft.Extensions.Options.IOptionsMonitor<Options> optionsMonitor, + IOptionsMonitor<Options> optionsMonitor, ILogger<FTPService> log) { Factory = ftpClientFactory; diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs index cb31e6dc..04994d92 100644 --- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs +++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs @@ -15,6 +15,8 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> +using Microsoft.Extensions.Options; + namespace slskd.Integrations.Pushbullet { using System; @@ -41,7 +43,7 @@ namespace slskd.Integrations.Pushbullet /// <param name="log">The logger.</param> public PushbulletService( IHttpClientFactory httpClientFactory, - Microsoft.Extensions.Options.IOptionsMonitor<Options> optionsMonitor, + IOptionsMonitor<Options> optionsMonitor, ILogger<PushbulletService> log) { HttpClientFactory = httpClientFactory; |
