DontApplyToListElementsAttribute

DontApplyToListElements is used on other attributes, and indicates that those attributes should be applied only to the list, and not to the elements of the list.

Use this on attributes that should only work on a list or array property as a whole, and not on each element of the list.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)4)]
public sealed class DontApplyToListElementsAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.5.0

Example

The following example shows how DontApplyToListElements is used on ShowIfAttribute.

[DontApplyToListElements]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class VisibleIfAttribute : Attribute
{
    public string MemberName { get; private set; }

    public VisibleIfAttribute(string memberName)
    {
        this.MemberName = memberName;
    }
}