docs.unity.cn
    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 : object

    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.

    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.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, January 26, 2022
    Terms of use