using System; namespace AdvancedInspector { /// /// Redefine if a field/property can be expanded or not. /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)] public class ExpandableAttribute : Attribute, IListAttribute { private bool expanded = false; /// /// Makes the item expanded by default. /// public bool Expanded { get { return expanded; } set { expanded = value; } } private bool expandable = true; /// /// Default true, can force a field to not be expandable. /// public bool Expandable { get { return expandable; } set { expandable = value; } } public ExpandableAttribute() { } public ExpandableAttribute(bool expandable) { this.expandable = expandable; } public ExpandableAttribute(bool expandable, bool expanded) { this.expanded = expanded; this.expandable = expandable; } } }