From 6bc263052d2b60abfd9023aed0640a37655b6e87 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 20 Jun 2013 12:44:24 -0400 Subject: move child definitions to db --- .../BaseApplicationHost.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Common.Implementations') diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index 4c1ce8b99..a0c1a2f0f 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -407,6 +407,18 @@ namespace MediaBrowser.Common.Implementations } } + /// + /// Gets the export types. + /// + /// + /// IEnumerable{Type}. + public IEnumerable GetExportTypes() + { + var currentType = typeof(T); + + return AllConcreteTypes.AsParallel().Where(currentType.IsAssignableFrom); + } + /// /// Gets the exports. /// @@ -415,9 +427,7 @@ namespace MediaBrowser.Common.Implementations /// IEnumerable{``0}. public IEnumerable GetExports(bool manageLiftime = true) { - var currentType = typeof(T); - - var parts = AllConcreteTypes.AsParallel().Where(currentType.IsAssignableFrom).Select(CreateInstance).Cast().ToArray(); + var parts = GetExportTypes().Select(CreateInstance).Cast().ToArray(); if (manageLiftime) { -- cgit v1.2.3