aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common')
-rw-r--r--MediaBrowser.Common/IApplicationHost.cs11
-rw-r--r--MediaBrowser.Common/MediaBrowser.Common.csproj1
-rw-r--r--MediaBrowser.Common/Plugins/IDependencyModule.cs7
3 files changed, 19 insertions, 0 deletions
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs
index 3d5f3c96f..fb49cc5b9 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -152,4 +152,15 @@ 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);
+ }
}
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index 63819c5a9..5e0d3aa24 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -79,6 +79,7 @@
<Compile Include="Net\IWebSocketServer.cs" />
<Compile Include="Net\MimeTypes.cs" />
<Compile Include="Net\WebSocketConnectEventArgs.cs" />
+ <Compile Include="Plugins\IDependencyModule.cs" />
<Compile Include="Plugins\IPlugin.cs" />
<Compile Include="Progress\ActionableProgress.cs" />
<Compile Include="ScheduledTasks\IScheduledTask.cs" />
diff --git a/MediaBrowser.Common/Plugins/IDependencyModule.cs b/MediaBrowser.Common/Plugins/IDependencyModule.cs
new file mode 100644
index 000000000..37ebe0d5b
--- /dev/null
+++ b/MediaBrowser.Common/Plugins/IDependencyModule.cs
@@ -0,0 +1,7 @@
+namespace MediaBrowser.Common.Plugins
+{
+ public interface IDependencyModule
+ {
+ void BindDependencies(IDependencyContainer container);
+ }
+} \ No newline at end of file