diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-23 10:32:54 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-23 10:32:54 -0500 |
| commit | 33ed929b526acbda696f00f5966917ebd6a9ded2 (patch) | |
| tree | 18e75812ce71274a3e02f800536e8c144f4e5c45 /MediaBrowser.Common/Kernel/IApplicationHost.cs | |
| parent | 02634588710f65ce952d0229d7da6b9c9d341492 (diff) | |
| parent | e30b96217333cadb78dcc0a47545afd145c683a7 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts:
MediaBrowser.ServerApplication/CorePlugins/MediaBrowser.Api.dll
MediaBrowser.ServerApplication/CorePlugins/MediaBrowser.ApiInteraction.Javascript.dll
MediaBrowser.ServerApplication/CorePlugins/MediaBrowser.Server.Sqlite.dll
MediaBrowser.ServerApplication/CorePlugins/MediaBrowser.Server.WorldWeatherOnline.dll
MediaBrowser.ServerApplication/CorePlugins/MediaBrowser.WebDashboard.dll
Diffstat (limited to 'MediaBrowser.Common/Kernel/IApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Common/Kernel/IApplicationHost.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/MediaBrowser.Common/Kernel/IApplicationHost.cs b/MediaBrowser.Common/Kernel/IApplicationHost.cs index 63c63eb3d..ae2e71667 100644 --- a/MediaBrowser.Common/Kernel/IApplicationHost.cs +++ b/MediaBrowser.Common/Kernel/IApplicationHost.cs @@ -43,5 +43,33 @@ namespace MediaBrowser.Common.Kernel /// </summary> /// <returns>Task.</returns> Task UpdateApplication(CancellationToken cancellationToken, IProgress<double> progress); + + /// <summary> + /// Creates an instance of type and resolves all constructor dependancies + /// </summary> + /// <param name="type">The type.</param> + /// <returns>System.Object.</returns> + object CreateInstance(Type type); + + /// <summary> + /// Registers a service that other classes can use as a dependancy. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="obj">The obj.</param> + void Register<T>(T obj) where T : class; + + /// <summary> + /// Resolves this instance. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns>``0.</returns> + T Resolve<T>(); + + /// <summary> + /// Resolves this instance. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns>``0.</returns> + T TryResolve<T>(); } } |
