2016-11-24 18:16:14 +01:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.ObjectResolution
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates the relative weight of a resolved object type.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
|
|
|
|
public class WeightAttribute : Attribute
|
|
|
|
|
{
|
2016-11-25 10:35:36 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="WeightAttribute"/> class with a weight.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="weight">The object type weight.</param>
|
2016-11-28 09:38:50 +01:00
|
|
|
public WeightAttribute(int weight)
|
2016-11-25 10:35:36 +01:00
|
|
|
{
|
|
|
|
|
Weight = weight;
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-24 18:16:14 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the weight of the object type.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Weight { get; private set; }
|
|
|
|
|
}
|
|
|
|
|
}
|