makes PropertyEditorResolver faster by not having to re-union every time its accessed

This commit is contained in:
Shannon
2015-03-02 16:59:40 +11:00
parent 21c70462c9
commit 56017a340c

View File

@@ -17,14 +17,17 @@ namespace Umbraco.Core.PropertyEditors
public PropertyEditorResolver(Func<IEnumerable<Type>> typeListProducerList)
: base(typeListProducerList, ObjectLifetimeScope.Application)
{
_unioned = new Lazy<List<PropertyEditor>>(() => Values.Union(ManifestBuilder.PropertyEditors).ToList());
}
private readonly Lazy<List<PropertyEditor>> _unioned;
/// <summary>
/// Returns the property editors
/// </summary>
public IEnumerable<PropertyEditor> PropertyEditors
{
get { return Values.Union(ManifestBuilder.PropertyEditors); }
get { return _unioned.Value; }
}
/// <summary>