split files into separate classes

This commit is contained in:
Luke Pulverenti
2014-05-08 17:23:24 -04:00
parent e653b41000
commit dce9093ba1
46 changed files with 293 additions and 156 deletions

View File

@@ -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);
}
}

View 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);
}
}

View File

@@ -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" />

View File

@@ -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; }
}
}

View 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; }
}
}

View File

@@ -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; }
}
}

View File

@@ -0,0 +1,7 @@
namespace MediaBrowser.Common.ScheduledTasks
{
public interface IHasKey
{
string Key { get; }
}
}

View File

@@ -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; }
}
}

View File

@@ -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; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace MediaBrowser.Common.Updates
{
public class InstallationFailedEventArgs : InstallationEventArgs
{
public Exception Exception { get; set; }
}
}