Fix merge
This commit is contained in:
@@ -530,7 +530,7 @@ namespace Umbraco.Core.Composing
|
||||
// if not caching, or not IDiscoverable, directly get types
|
||||
if (cache == false || typeof(IDiscoverable).IsAssignableFrom(typeof(T)) == false)
|
||||
{
|
||||
_logger.Logger.Debug<TypeLoader>("Running a full, non-cached, scan for type {TypeName} (slow).", typeof(T).FullName);
|
||||
_logger.Debug<TypeLoader>("Running a full, non-cached, scan for type {TypeName} (slow).", typeof(T).FullName);
|
||||
|
||||
return GetTypesInternal(
|
||||
typeof (T), null,
|
||||
@@ -574,7 +574,7 @@ namespace Umbraco.Core.Composing
|
||||
// if not caching, or not IDiscoverable, directly get types
|
||||
if (cache == false || typeof(IDiscoverable).IsAssignableFrom(typeof(T)) == false)
|
||||
{
|
||||
_logger.Logger.Debug<TypeLoader>("Running a full, non-cached, scan for type {TypeName} / attribute {AttributeName} (slow).", typeof(T).FullName, typeof(TAttribute).FullName);
|
||||
_logger.Debug<TypeLoader>("Running a full, non-cached, scan for type {TypeName} / attribute {AttributeName} (slow).", typeof(T).FullName, typeof(TAttribute).FullName);
|
||||
|
||||
return GetTypesInternal(
|
||||
typeof (T), typeof (TAttribute),
|
||||
@@ -617,7 +617,7 @@ namespace Umbraco.Core.Composing
|
||||
|
||||
if (cache == false)
|
||||
{
|
||||
_logger.Logger.Debug<TypeLoader>("Running a full, non-cached, scan for types / attribute {AttributeName} (slow).", typeof(TAttribute).FullName);
|
||||
_logger.Debug<TypeLoader>("Running a full, non-cached, scan for types / attribute {AttributeName} (slow).", typeof(TAttribute).FullName);
|
||||
}
|
||||
|
||||
return GetTypesInternal(
|
||||
|
||||
@@ -71,11 +71,11 @@ namespace Umbraco.Web.Composing.Composers
|
||||
// scan and register every UmbracoApiController in everything (UmbracoApiController is IDiscoverable and IHttpController)
|
||||
var nonUmbracoWebApiControllers = composition.TypeLoader.GetTypes<UmbracoApiController>().Where(x => x.Assembly != umbracoWebAssembly);
|
||||
composition.RegisterControllers(nonUmbracoWebApiControllers);
|
||||
|
||||
|
||||
return composition;
|
||||
}
|
||||
|
||||
private static void RegisterControllers<TController>(this Composition composition, IEnumerable<Type> controllerTypes)
|
||||
private static void RegisterControllers(this Composition composition, IEnumerable<Type> controllerTypes)
|
||||
{
|
||||
foreach (var controllerType in controllerTypes)
|
||||
composition.Register(controllerType, Lifetime.Request);
|
||||
|
||||
Reference in New Issue
Block a user