Fixes: #U4-894 - moves the int Priority out of the IThumbnailProvider class as it is only metadata, moved
this into a new generic WeightedPluginAttribute which can be used for other resolves/objects that require a weight.
This commit is contained in:
19
src/Umbraco.Core/ObjectResolution/WeightedPluginAttribute.cs
Normal file
19
src/Umbraco.Core/ObjectResolution/WeightedPluginAttribute.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Core.ObjectResolution
|
||||
{
|
||||
/// <summary>
|
||||
/// Some many object resolvers require that the objects that they resolve have weights applied to them so that
|
||||
/// the objects are returned in a sorted order, this attribute is used in these scenarios.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
|
||||
internal class WeightedPluginAttribute : Attribute
|
||||
{
|
||||
public WeightedPluginAttribute(int weight)
|
||||
{
|
||||
Weight = weight;
|
||||
}
|
||||
|
||||
public int Weight { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user