Class PropertyVisitor | Properties | 0.10.4-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class PropertyVisitor

    Default base class for extending the visitation API.

    Inheritance
    Object
    PropertyVisitor
    Namespace: Unity.Properties
    Syntax
    public class PropertyVisitor : IPropertyVisitor

    Methods

    AddAdapter(IPropertyVisitorAdapter)

    Declaration
    public void AddAdapter(IPropertyVisitorAdapter adapter)
    Parameters
    Type Name Description
    IPropertyVisitorAdapter adapter

    BeginCollection<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker)

    Invoked before entering into a collection node.

    If false is returned, the collection should NOT be visited and EndCollection<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker) should NOT be called.

    Declaration
    protected virtual VisitStatus BeginCollection<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref TValue value, ref ChangeTracker changeTracker)
        where TProperty : ICollectionProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    TValue value
    ChangeTracker changeTracker
    Returns
    Type Description
    VisitStatus

    True if the visit event was consumed.

    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    BeginContainer<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker)

    Invoked before entering into a container node.

    If false is returned, the container should NOT be visited and EndContainer<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker) should NOT be called.

    Declaration
    protected virtual VisitStatus BeginContainer<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref TValue value, ref ChangeTracker changeTracker)
        where TProperty : IProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    TValue value
    ChangeTracker changeTracker
    Returns
    Type Description
    VisitStatus

    True if the visit event was consumed.

    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    EndCollection<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker)

    Invoked after completing a collection node. Only if BeginCollection<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker) returned true.

    Declaration
    protected virtual void EndCollection<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref TValue value, ref ChangeTracker changeTracker)
        where TProperty : ICollectionProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    TValue value
    ChangeTracker changeTracker
    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    EndContainer<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker)

    Invoked after completing the node. Only if BeginContainer<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker) returned true.

    Declaration
    protected virtual void EndContainer<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref TValue value, ref ChangeTracker changeTracker)
        where TProperty : IProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    TValue value
    ChangeTracker changeTracker
    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    IsExcluded<TProperty, TContainer, TValue>(TProperty, ref TContainer)

    Invoked before entering into any node.

    Declaration
    public virtual bool IsExcluded<TProperty, TContainer, TValue>(TProperty property, ref TContainer container)
        where TProperty : IProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    Returns
    Type Description
    Boolean

    True if the visit event should be skipped.

    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    Visit<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref TValue, ref ChangeTracker)

    Invoked when entering any value leaf node.

    Declaration
    protected virtual VisitStatus Visit<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref TValue value, ref ChangeTracker changeTracker)
        where TProperty : IProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    TValue value
    ChangeTracker changeTracker
    Returns
    Type Description
    VisitStatus
    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue

    VisitCollectionProperty<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref ChangeTracker)

    Declaration
    public VisitStatus VisitCollectionProperty<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref ChangeTracker changeTracker)
        where TProperty : ICollectionProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    ChangeTracker changeTracker
    Returns
    Type Description
    VisitStatus
    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue
    Implements
    IPropertyVisitor.VisitCollectionProperty<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref ChangeTracker)

    VisitProperty<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref ChangeTracker)

    Declaration
    public VisitStatus VisitProperty<TProperty, TContainer, TValue>(TProperty property, ref TContainer container, ref ChangeTracker changeTracker)
        where TProperty : IProperty<TContainer, TValue>
    Parameters
    Type Name Description
    TProperty property
    TContainer container
    ChangeTracker changeTracker
    Returns
    Type Description
    VisitStatus
    Type Parameters
    Name Description
    TProperty
    TContainer
    TValue
    Implements
    IPropertyVisitor.VisitProperty<TProperty, TContainer, TValue>(TProperty, ref TContainer, ref ChangeTracker)
    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