2012-07-27 10:53:40 +06:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Umbraco.Core;
|
|
|
|
|
using umbraco.BusinessLogic.Actions;
|
|
|
|
|
using umbraco.businesslogic;
|
2012-07-27 11:54:29 +06:00
|
|
|
using umbraco.cms.businesslogic.macro;
|
2012-07-27 12:23:22 +06:00
|
|
|
using umbraco.cms.businesslogic.media;
|
2012-07-27 10:53:40 +06:00
|
|
|
using umbraco.interfaces;
|
|
|
|
|
|
|
|
|
|
namespace umbraco.cms
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extension methods for the PluginTypeResolver
|
|
|
|
|
/// </summary>
|
2012-08-01 22:06:15 +06:00
|
|
|
public static class PluginManagerExtensions
|
|
|
|
|
{
|
2012-07-27 10:53:40 +06:00
|
|
|
|
2012-07-31 03:14:24 +06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Returns all available IActions in application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="resolver"></param>
|
|
|
|
|
/// <returns></returns>
|
2012-08-01 22:06:15 +06:00
|
|
|
internal static IEnumerable<Type> ResolveActions(this PluginManager resolver)
|
2012-07-31 03:14:24 +06:00
|
|
|
{
|
|
|
|
|
return resolver.ResolveTypes<IAction>();
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-27 11:54:29 +06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Returns all available IDataType in application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="resolver"></param>
|
|
|
|
|
/// <returns></returns>
|
2012-08-01 22:06:15 +06:00
|
|
|
internal static IEnumerable<Type> ResolveMacroEngines(this PluginManager resolver)
|
2012-07-27 11:54:29 +06:00
|
|
|
{
|
|
|
|
|
return resolver.ResolveTypes<IMacroEngine>();
|
|
|
|
|
}
|
|
|
|
|
|
2012-07-27 12:23:22 +06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Returns all available IMediaFactory in application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="resolver"></param>
|
|
|
|
|
/// <returns></returns>
|
2013-11-26 20:03:13 +11:00
|
|
|
[Obsolete("We don't use IMediaFactory anymore, we need to remove this when we remove the MediaFactory instance that uses this method")]
|
2012-08-01 22:06:15 +06:00
|
|
|
internal static IEnumerable<Type> ResolveMediaFactories(this PluginManager resolver)
|
2012-07-27 12:23:22 +06:00
|
|
|
{
|
|
|
|
|
return resolver.ResolveTypes<IMediaFactory>();
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-01 23:03:26 +06:00
|
|
|
|
2012-07-27 12:29:41 +06:00
|
|
|
|
2012-07-27 10:53:40 +06:00
|
|
|
}
|
|
|
|
|
}
|