Class PropertyAttributeExtensions | Properties | 1.1.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class PropertyAttributeExtensions

    A set of property extension methods for attributes.

    Inheritance
    Object
    PropertyAttributeExtensions
    Namespace: Unity.Properties
    Syntax
    public static class PropertyAttributeExtensions

    Methods

    WithAttribute<TProperty>(TProperty, Attribute)

    Adds the specified attribute to the property.

    Declaration
    public static TProperty WithAttribute<TProperty>(this TProperty property, Attribute attribute)
        where TProperty : IProperty
    Parameters
    Type Name Description
    TProperty property

    The property this method extends.

    Attribute attribute

    The attribute to add.

    Returns
    Type Description
    TProperty

    The property this method extends.

    Type Parameters
    Name Description
    TProperty

    The property type.

    Exceptions
    Type Condition
    InvalidOperationException

    The property does not implement attributes.

    WithAttributes<TProperty>(TProperty, IEnumerable<Attribute>)

    Adds the specified attributes to the property.

    Declaration
    public static TProperty WithAttributes<TProperty>(this TProperty property, IEnumerable<Attribute> attributes)
        where TProperty : IProperty
    Parameters
    Type Name Description
    TProperty property

    The property this method extends.

    IEnumerable<Attribute> attributes

    The attributes to add.

    Returns
    Type Description
    TProperty

    The property this method extends.

    Type Parameters
    Name Description
    TProperty

    The property type.

    Exceptions
    Type Condition
    InvalidOperationException

    The property does not implement attributes.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023