diff options
| author | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-04-24 18:51:19 -0500 |
|---|---|---|
| committer | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-04-24 18:51:19 -0500 |
| commit | 70e50dfa90575cc5e906be1509d3ed363eb1ada4 (patch) | |
| tree | e058142c3bd54034d0f6507b4b2260e0b9d5078a /Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs | |
| parent | 33390153fdfec33e4149c12dd3a876248f4e08cc (diff) | |
Apply suggestions from code review
Diffstat (limited to 'Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs index e24dc3a67..b8b51adb6 100644 --- a/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs +++ b/Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs @@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.QuickConnect /// Should only be called at server startup when a singleton is created. /// </summary> /// <param name="config">Configuration.</param> - /// <param name="loggerFactory">Logger.</param> + /// <param name="logger">Logger.</param> /// <param name="userManager">User manager.</param> /// <param name="localization">Localization.</param> /// <param name="jsonSerializer">JSON serializer.</param> @@ -52,7 +52,7 @@ namespace Emby.Server.Implementations.QuickConnect /// <param name="taskManager">Task scheduler.</param> public QuickConnectManager( IServerConfigurationManager config, - ILoggerFactory loggerFactory, + ILogger<QuickConnectManager> logger, IUserManager userManager, ILocalizationManager localization, IJsonSerializer jsonSerializer, @@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.QuickConnect ITaskManager taskManager) { _config = config; - _logger = loggerFactory.CreateLogger(nameof(QuickConnectManager)); + _logger = logger; _userManager = userManager; _localizationManager = localization; _jsonSerializer = jsonSerializer; @@ -196,8 +196,6 @@ namespace Emby.Server.Implementations.QuickConnect /// <inheritdoc/> public string GenerateCode() { - // TODO: output may be biased - int min = (int)Math.Pow(10, CodeLength - 1); int max = (int)Math.Pow(10, CodeLength); |
