A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using System;
5using osu.Framework.Extensions.EnumExtensions;
6
7namespace osu.Framework.Utils
8{
9 /// <summary>
10 /// Marker attribute for <see cref="Enum"/> classes whose members are annotated with <see cref="OrderAttribute"/>.
11 /// Methods from the <see cref="EnumExtensions"/> static class use the order defined with these attributes.
12 /// </summary>
13 [AttributeUsage(AttributeTargets.Enum)]
14 public class HasOrderedElementsAttribute : Attribute
15 {
16 /// <summary>
17 /// Allow for partially ordering <see cref="Enum"/> members.
18 /// Members without an <see cref="OrderAttribute"/> will default to their value as ordering key.
19 /// </summary>
20 public bool AllowPartialOrdering { get; set; }
21 }
22}