Changed over Action to use PluginTypeResolver to find and instantiate IActionHandlers and included a unit test.

This commit is contained in:
shannon@ShandemVaio
2012-07-27 10:53:40 +06:00
parent 09a68f9376
commit 1823cce4f6
8 changed files with 69 additions and 18 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using Umbraco.Core;
using umbraco.BusinessLogic.Actions;
using umbraco.businesslogic;
using umbraco.interfaces;
namespace umbraco.cms
{
/// <summary>
/// Extension methods for the PluginTypeResolver
/// </summary>
public static class PluginTypeResolverExtensions
{
/// <summary>
/// Returns all available IActionHandler in application
/// </summary>
/// <param name="resolver"></param>
/// <returns></returns>
internal static IEnumerable<Type> ResolveActions(this PluginTypeResolver resolver)
{
return resolver.ResolveTypes<IActionHandler>();
}
}
}