Class PropertyVisitor | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class PropertyVisitor

    Default base class for extending the visitation API.

    Inheritance
    System.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
    System.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 © 2019 Unity Technologies
    Generated by DocFX