using System;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Diagnostics;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Threading;
using System.Collections.Generic;
using System.Threading;
namespace MediaBrowser.Api
{
///
/// Class ServerEntryPoint
///
public class ApiEntryPoint : IServerEntryPoint
{
///
/// The instance
///
public static ApiEntryPoint Instance;
///
/// Gets or sets the logger.
///
/// The logger.
internal ILogger Logger { get; private set; }
internal IHttpResultFactory ResultFactory { get; private set; }
///
/// The application paths
///
private readonly IServerConfigurationManager _config;
private readonly ISessionManager _sessionManager;
private readonly IFileSystem _fileSystem;
private readonly IMediaSourceManager _mediaSourceManager;
public readonly ITimerFactory TimerFactory;
public readonly IProcessFactory ProcessFactory;
private readonly Dictionary _transcodingLocks =
new Dictionary();
///
/// Initializes a new instance of the class.
///
/// The logger.
/// The session manager.
/// The configuration.
/// The file system.
/// The media source manager.
public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager, ITimerFactory timerFactory, IProcessFactory processFactory, IHttpResultFactory resultFactory)
{
Logger = logger;
_sessionManager = sessionManager;
_config = config;
_fileSystem = fileSystem;
_mediaSourceManager = mediaSourceManager;
TimerFactory = timerFactory;
ProcessFactory = processFactory;
ResultFactory = resultFactory;
Instance = this;
}
public static string[] Split(string value, char separator, bool removeEmpty)
{
if (string.IsNullOrWhiteSpace(value))
{
return Array.Empty();
}
if (removeEmpty)
{
return value.Split(new[] { separator }, StringSplitOptions.RemoveEmptyEntries);
}
return value.Split(separator);
}
public void Run()
{
}
public void Dispose()
{
}
}
}