Apply suggestions from code review
This commit is contained in:
parent
33390153fd
commit
70e50dfa90
|
@ -1,5 +1,3 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||||
/// Should only be called at server startup when a singleton is created.
|
/// Should only be called at server startup when a singleton is created.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="config">Configuration.</param>
|
/// <param name="config">Configuration.</param>
|
||||||
/// <param name="loggerFactory">Logger.</param>
|
/// <param name="logger">Logger.</param>
|
||||||
/// <param name="userManager">User manager.</param>
|
/// <param name="userManager">User manager.</param>
|
||||||
/// <param name="localization">Localization.</param>
|
/// <param name="localization">Localization.</param>
|
||||||
/// <param name="jsonSerializer">JSON serializer.</param>
|
/// <param name="jsonSerializer">JSON serializer.</param>
|
||||||
|
@ -52,7 +52,7 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||||
/// <param name="taskManager">Task scheduler.</param>
|
/// <param name="taskManager">Task scheduler.</param>
|
||||||
public QuickConnectManager(
|
public QuickConnectManager(
|
||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config,
|
||||||
ILoggerFactory loggerFactory,
|
ILogger<QuickConnectManager> logger,
|
||||||
IUserManager userManager,
|
IUserManager userManager,
|
||||||
ILocalizationManager localization,
|
ILocalizationManager localization,
|
||||||
IJsonSerializer jsonSerializer,
|
IJsonSerializer jsonSerializer,
|
||||||
|
@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||||
ITaskManager taskManager)
|
ITaskManager taskManager)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
_logger = loggerFactory.CreateLogger(nameof(QuickConnectManager));
|
_logger = logger;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_localizationManager = localization;
|
_localizationManager = localization;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
|
@ -196,8 +196,6 @@ namespace Emby.Server.Implementations.QuickConnect
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public string GenerateCode()
|
public string GenerateCode()
|
||||||
{
|
{
|
||||||
// TODO: output may be biased
|
|
||||||
|
|
||||||
int min = (int)Math.Pow(10, CodeLength - 1);
|
int min = (int)Math.Pow(10, CodeLength - 1);
|
||||||
int max = (int)Math.Pow(10, CodeLength);
|
int max = (int)Math.Pow(10, CodeLength);
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,16 @@ namespace MediaBrowser.Model.QuickConnect
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This feature has not been opted into and is unavailable until the server administrator chooses to opt-in.
|
/// This feature has not been opted into and is unavailable until the server administrator chooses to opt-in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Unavailable,
|
Unavailable = 0,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The feature is enabled for use on the server but is not currently accepting connection requests.
|
/// The feature is enabled for use on the server but is not currently accepting connection requests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Available,
|
Available = 1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The feature is actively accepting connection requests.
|
/// The feature is actively accepting connection requests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Active
|
Active = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user