using MediaBrowser.Common.Security;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Logging;
using System;
namespace MediaBrowser.Server.Implementations.EntryPoints
{
///
/// Class LoadRegistrations
///
public class LoadRegistrations : IServerEntryPoint
{
///
/// The _security manager
///
private readonly ISecurityManager _securityManager;
///
/// The _logger
///
private readonly ILogger _logger;
///
/// Initializes a new instance of the class.
///
/// The security manager.
/// The log manager.
public LoadRegistrations(ISecurityManager securityManager, ILogManager logManager)
{
_securityManager = securityManager;
_logger = logManager.GetLogger("Registration Loader");
}
///
/// Runs this instance.
///
public async void Run()
{
try
{
await _securityManager.LoadAllRegistrationInfo().ConfigureAwait(false);
}
catch (Exception ex)
{
_logger.ErrorException("Error loading registration info", ex);
}
}
///
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
///
public void Dispose()
{
}
}
}