to all be lazy resolvers as they are not needed instantly on app startup (not needed by the front-end) This will make app startup a lot quicker. Fixes ActionsResolver to not use the PluginManager to resolve the types when it is instantiating them since these are passed in the ctor. Updates all unit tests to use lazy delegate for these resolvers and they are all passing.
36 lines
781 B
C#
36 lines
781 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Umbraco.Core.ObjectResolution;
|
|
using umbraco.interfaces;
|
|
|
|
namespace Umbraco.Core
|
|
{
|
|
/// <summary>
|
|
/// A resolver to return all IPackageAction objects
|
|
/// </summary>
|
|
internal sealed class PackageActionsResolver : LazyManyObjectsResolverBase<PackageActionsResolver, IPackageAction>
|
|
{
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
/// <param name="packageActions"></param>
|
|
internal PackageActionsResolver(Func<IEnumerable<Type>> packageActions)
|
|
: base(packageActions)
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the <see cref="IPackageAction"/> implementations.
|
|
/// </summary>
|
|
public IEnumerable<IPackageAction> PackageActions
|
|
{
|
|
get
|
|
{
|
|
return Values;
|
|
}
|
|
}
|
|
|
|
}
|
|
} |