From 12409ababbeabab97f57d995c2c8e68d5feb9247 Mon Sep 17 00:00:00 2001 From: EzioTheDeadPoet <52624146+EzioTheDeadPoet@users.noreply.github.com> Date: Tue, 28 May 2024 18:45:03 +0200 Subject: [PATCH] refactor interface name to the naming convention for interfaces --- Wabbajack.CLI/Verbs/SetNexusApiKey.cs | 14 ++++---------- Wabbajack.Networking.NexusApi/AuthInfo.cs | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Wabbajack.CLI/Verbs/SetNexusApiKey.cs b/Wabbajack.CLI/Verbs/SetNexusApiKey.cs index 95775d7f..a6657644 100644 --- a/Wabbajack.CLI/Verbs/SetNexusApiKey.cs +++ b/Wabbajack.CLI/Verbs/SetNexusApiKey.cs @@ -1,29 +1,23 @@ - -using System.CommandLine; -using System.CommandLine.Invocation; -using System.CommandLine.NamingConventionBinder; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Wabbajack.CLI.Builder; using Wabbajack.DTOs.Logins; -using Wabbajack.Paths; -using Wabbajack.Paths.IO; using Wabbajack.Services.OSIntegrated; namespace Wabbajack.CLI.Verbs; public class SetNexusApiKey { - private readonly EncryptedJsonTokenProvider _tokenProvider; + private readonly EncryptedJsonTokenProvider _tokenProvider; private readonly ILogger _logger; - public SetNexusApiKey(EncryptedJsonTokenProvider tokenProvider, ILogger logger) + public SetNexusApiKey(EncryptedJsonTokenProvider tokenProvider, ILogger logger) { _tokenProvider = tokenProvider; _logger = logger; } - public static VerbDefinition Definition = new VerbDefinition("set-nexus-api-key", + public static VerbDefinition Definition = new("set-nexus-api-key", "Sets the Nexus API key to the specified value", [ new OptionDefinition(typeof(string), "k", "key", "The Nexus API key") @@ -38,7 +32,7 @@ public class SetNexusApiKey } else { - await _tokenProvider.SetToken(new NexusApiState { ApiKey = key }); + await _tokenProvider.SetToken(new() { ApiKey = key }); _logger.LogInformation("Set Nexus API Key to {key}", key); return 0; } diff --git a/Wabbajack.Networking.NexusApi/AuthInfo.cs b/Wabbajack.Networking.NexusApi/AuthInfo.cs index fa25d3f8..7699e1b4 100644 --- a/Wabbajack.Networking.NexusApi/AuthInfo.cs +++ b/Wabbajack.Networking.NexusApi/AuthInfo.cs @@ -3,6 +3,6 @@ using Wabbajack.Networking.Http.Interfaces; namespace Wabbajack.Networking.NexusApi; -public interface AuthInfo : ITokenProvider +public interface IAuthInfo : ITokenProvider { } \ No newline at end of file