mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-27 12:34:56 +01:00
split files into separate classes
This commit is contained in:
@@ -152,15 +152,4 @@ namespace MediaBrowser.Common
|
||||
/// <returns>System.Object.</returns>
|
||||
object CreateInstance(Type type);
|
||||
}
|
||||
|
||||
public interface IDependencyContainer
|
||||
{
|
||||
void RegisterSingleInstance<T>(T obj, bool manageLifetime = true)
|
||||
where T : class;
|
||||
|
||||
void RegisterSingleInstance<T>(Func<T> func)
|
||||
where T : class;
|
||||
|
||||
void Register(Type typeInterface, Type typeImplementation);
|
||||
}
|
||||
}
|
||||
|
||||
15
MediaBrowser.Common/IDependencyContainer.cs
Normal file
15
MediaBrowser.Common/IDependencyContainer.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common
|
||||
{
|
||||
public interface IDependencyContainer
|
||||
{
|
||||
void RegisterSingleInstance<T>(T obj, bool manageLifetime = true)
|
||||
where T : class;
|
||||
|
||||
void RegisterSingleInstance<T>(Func<T> func)
|
||||
where T : class;
|
||||
|
||||
void Register(Type typeInterface, Type typeImplementation);
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@
|
||||
<Compile Include="Events\EventHelper.cs" />
|
||||
<Compile Include="Extensions\BaseExtensions.cs" />
|
||||
<Compile Include="Extensions\ResourceNotFoundException.cs" />
|
||||
<Compile Include="IDependencyContainer.cs" />
|
||||
<Compile Include="IO\FileSystemRepository.cs" />
|
||||
<Compile Include="IO\IFileSystem.cs" />
|
||||
<Compile Include="IO\ProgressStream.cs" />
|
||||
@@ -78,9 +79,12 @@
|
||||
<Compile Include="Net\IWebSocketServer.cs" />
|
||||
<Compile Include="Net\MimeTypes.cs" />
|
||||
<Compile Include="Net\WebSocketConnectEventArgs.cs" />
|
||||
<Compile Include="Net\WebSocketMessageInfo.cs" />
|
||||
<Compile Include="Plugins\IDependencyModule.cs" />
|
||||
<Compile Include="Plugins\IPlugin.cs" />
|
||||
<Compile Include="Progress\ActionableProgress.cs" />
|
||||
<Compile Include="ScheduledTasks\IConfigurableScheduledTask.cs" />
|
||||
<Compile Include="ScheduledTasks\IHasKey.cs" />
|
||||
<Compile Include="ScheduledTasks\IScheduledTask.cs" />
|
||||
<Compile Include="ScheduledTasks\IScheduledTaskWorker.cs" />
|
||||
<Compile Include="ScheduledTasks\ITaskManager.cs" />
|
||||
@@ -98,6 +102,7 @@
|
||||
<Compile Include="Security\ISecurityManager.cs" />
|
||||
<Compile Include="Updates\IInstallationManager.cs" />
|
||||
<Compile Include="Updates\InstallationEventArgs.cs" />
|
||||
<Compile Include="Updates\InstallationFailedEventArgs.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
||||
@@ -65,16 +65,4 @@ namespace MediaBrowser.Common.Net
|
||||
/// <exception cref="System.ArgumentNullException">buffer</exception>
|
||||
Task SendAsync(byte[] buffer, WebSocketMessageType type, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class WebSocketMessageInfo
|
||||
/// </summary>
|
||||
public class WebSocketMessageInfo : WebSocketMessage<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the connection.
|
||||
/// </summary>
|
||||
/// <value>The connection.</value>
|
||||
public IWebSocketConnection Connection { get; set; }
|
||||
}
|
||||
}
|
||||
16
MediaBrowser.Common/Net/WebSocketMessageInfo.cs
Normal file
16
MediaBrowser.Common/Net/WebSocketMessageInfo.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using MediaBrowser.Model.Net;
|
||||
|
||||
namespace MediaBrowser.Common.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Class WebSocketMessageInfo
|
||||
/// </summary>
|
||||
public class WebSocketMessageInfo : WebSocketMessage<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the connection.
|
||||
/// </summary>
|
||||
/// <value>The connection.</value>
|
||||
public IWebSocketConnection Connection { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace MediaBrowser.Common.ScheduledTasks
|
||||
{
|
||||
public interface IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is hidden.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
|
||||
bool IsHidden { get; }
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is enabled.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
|
||||
bool IsEnabled { get; }
|
||||
}
|
||||
}
|
||||
7
MediaBrowser.Common/ScheduledTasks/IHasKey.cs
Normal file
7
MediaBrowser.Common/ScheduledTasks/IHasKey.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace MediaBrowser.Common.ScheduledTasks
|
||||
{
|
||||
public interface IHasKey
|
||||
{
|
||||
string Key { get; }
|
||||
}
|
||||
}
|
||||
@@ -42,23 +42,4 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||
IEnumerable<ITaskTrigger> GetDefaultTriggers();
|
||||
}
|
||||
|
||||
public interface IConfigurableScheduledTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is hidden.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
|
||||
bool IsHidden { get; }
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is enabled.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
|
||||
bool IsEnabled { get; }
|
||||
}
|
||||
|
||||
public interface IHasKey
|
||||
{
|
||||
string Key { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Model.Updates;
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Updates
|
||||
{
|
||||
@@ -9,9 +8,4 @@ namespace MediaBrowser.Common.Updates
|
||||
|
||||
public PackageVersionInfo PackageVersionInfo { get; set; }
|
||||
}
|
||||
|
||||
public class InstallationFailedEventArgs : InstallationEventArgs
|
||||
{
|
||||
public Exception Exception { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Updates
|
||||
{
|
||||
public class InstallationFailedEventArgs : InstallationEventArgs
|
||||
{
|
||||
public Exception Exception { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user