Fixing: U4-3686 Umbraco 7 - Rich Text Editor and Macro Issues + fixed up the per-controller webapi configuration and more fixes to loading propertyeditors/param editors, this saves a assembly scan.

This commit is contained in:
Shannon
2013-12-06 15:01:58 +11:00
parent dc7c7304ad
commit 2eb5c08825
12 changed files with 118 additions and 95 deletions

View File

@@ -459,24 +459,24 @@ namespace Umbraco.Core
private readonly HashSet<TypeList> _types = new HashSet<TypeList>();
private IEnumerable<Assembly> _assemblies;
/// <summary>
/// Returns all found property editors
/// Returns all found property editors (based on the resolved Iparameter editors - this saves a scan)
/// </summary>
internal IEnumerable<Type> ResolvePropertyEditors()
{
//return all proeprty editor types found except for the base property editor type
return ResolveTypes<PropertyEditor>().ToArray()
.Except(new[] {typeof (PropertyEditor)});
return ResolveTypes<IParameterEditor>()
.Where(x => x.IsType<PropertyEditor>())
.Except(new[] { typeof(PropertyEditor) });
}
/// <summary>
/// Returns all found parameter editors
/// Returns all found parameter editors (which includes property editors)
/// </summary>
internal IEnumerable<Type> ResolveParameterEditors()
{
//return all paramter editor types found except for the base property editor type
return ResolveTypes<IParameterEditor>().ToArray()
return ResolveTypes<IParameterEditor>()
.Except(new[] { typeof(ParameterEditor), typeof(PropertyEditor) });
}