Merge pull request #2013 from umbraco/temp-U4-10046

U4-10046 Stop resolving TreeController from the PluginManager for eve…
This commit is contained in:
Sebastiaan Janssen
2017-06-21 10:15:07 +02:00
committed by GitHub

View File

@@ -718,11 +718,19 @@ namespace Umbraco.Web.Editors
return app;
}
/// <summary>
/// A lazy reference to all tree controller types
/// </summary>
/// <remarks>
/// We are doing this because if we constantly resolve the tree controller types from the PluginManager it will re-scan and also re-log that
/// it's resolving which is unecessary and annoying.
/// </remarks>
private static readonly Lazy<IEnumerable<Type>> TreeControllerTypes = new Lazy<IEnumerable<Type>>(() => PluginManager.Current.ResolveAttributedTreeControllers().ToArray());
private IEnumerable<Dictionary<string, string>> GetTreePluginsMetaData()
{
var treeTypes = PluginManager.Current.ResolveAttributedTreeControllers();
var treeTypes = TreeControllerTypes.Value;
//get all plugin trees with their attributes
var treesWithAttributes = treeTypes.Select(x => new
{