docs.unity3d.com
    Show / Hide Table of Contents

    Struct PropertyCollection<TContainer>

    The PropertyCollection<TContainer> struct provides enumerable access to all IProperty<TContainer> for a given PropertyBag<TContainer>.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Properties
    Syntax
    public readonly struct PropertyCollection<TContainer> : IEnumerable<IProperty<TContainer>>, IEnumerable
    Type Parameters
    Name Description
    TContainer

    The container type which this collection exposes properties for.

    Constructors

    PropertyCollection(IEnumerable<IProperty<TContainer>>)

    Initializes a new instance of the PropertyCollection<TContainer> struct which wraps the given enumerable.

    Declaration
    public PropertyCollection(IEnumerable<IProperty<TContainer>> enumerable)
    Parameters
    Type Name Description
    IEnumerable<IProperty<TContainer>> enumerable

    An IEnumerable of properties to wrap.

    PropertyCollection(List<IProperty<TContainer>>)

    Initializes a new instance of the PropertyCollection<TContainer> struct which wraps the given properties list.

    Declaration
    public PropertyCollection(List<IProperty<TContainer>> properties)
    Parameters
    Type Name Description
    List<IProperty<TContainer>> properties

    A list of properties to wrap.

    Properties

    Empty

    Returns an empty collection of properties.

    Declaration
    public static readonly PropertyCollection<TContainer> Empty { get; }
    Property Value
    Type Description
    PropertyCollection<TContainer>

    Methods

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public readonly PropertyCollection<TContainer>.Enumerator GetEnumerator()
    Returns
    Type Description
    PropertyCollection.Enumerator<>

    An enumerator that can be used to iterate through the collection.

    Explicit Interface Implementations

    IEnumerable<IProperty<TContainer>>.GetEnumerator()

    Declaration
    readonly IEnumerator<IProperty<TContainer>> IEnumerable<IProperty<TContainer>>.GetEnumerator()
    Returns
    Type Description
    IEnumerator<IProperty<TContainer>>
    Implements
    IEnumerable<T>.GetEnumerator()

    IEnumerable.GetEnumerator()

    Declaration
    readonly IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator
    Implements
    IEnumerable.GetEnumerator()
    Back to top
    Terms of use
    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