Cleanup trees
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Media;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.Trees;
|
||||
using Umbraco.Web.WebApi;
|
||||
using Umbraco.Core.Composing;
|
||||
|
||||
@@ -10,29 +8,20 @@ using Umbraco.Core.Composing;
|
||||
namespace Umbraco.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for the PluginTypemgr
|
||||
/// Provides extension methods for the <see cref="TypeLoader"/> class.
|
||||
/// </summary>
|
||||
public static class TypeLoaderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all available TreeApiController's in application that are attribute with TreeAttribute
|
||||
/// Gets all types implementing <see cref="SurfaceController"/>.
|
||||
/// </summary>
|
||||
/// <param name="mgr"></param>
|
||||
/// <returns></returns>
|
||||
internal static IEnumerable<Type> GetAttributedTreeControllers(this TypeLoader mgr)
|
||||
{
|
||||
return mgr.GetTypesWithAttribute<TreeController, TreeAttribute>();
|
||||
}
|
||||
internal static IEnumerable<Type> GetSurfaceControllers(this TypeLoader typeLoader)
|
||||
=> typeLoader.GetTypes<SurfaceController>();
|
||||
|
||||
internal static IEnumerable<Type> GetSurfaceControllers(this TypeLoader mgr)
|
||||
{
|
||||
return mgr.GetTypes<SurfaceController>();
|
||||
}
|
||||
|
||||
internal static IEnumerable<Type> GetUmbracoApiControllers(this TypeLoader mgr)
|
||||
{
|
||||
return mgr.GetTypes<UmbracoApiController>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all types implementing <see cref="UmbracoApiController"/>.
|
||||
/// </summary>
|
||||
internal static IEnumerable<Type> GetUmbracoApiControllers(this TypeLoader typeLoader)
|
||||
=> typeLoader.GetTypes<UmbracoApiController>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user