Class PathVisitor
Helper visitor to visit a single property using a specified PropertyPath.
Inherited Members
Namespace: Unity.Properties
Syntax
public abstract class PathVisitor : IPropertyBagVisitor, IPropertyVisitor
Properties
Path
The path to visit.
Declaration
public PropertyPath Path { get; set; }
Property Value
Type | Description |
---|---|
PropertyPath |
ReadonlyVisit
Returns whether or not the visitor will write back values along the path.
Declaration
public bool ReadonlyVisit { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ReturnCode
Returns the error code encountered while visiting the provided path.
Declaration
public VisitReturnCode ReturnCode { get; protected set; }
Property Value
Type | Description |
---|---|
VisitReturnCode |
Methods
Reset()
Resets the state of the visitor.
Declaration
public virtual void Reset()
VisitPath<TContainer, TValue>(Property<TContainer, TValue>, ref TContainer, ref TValue)
Method called when the visitor has successfully visited the provided path.
Declaration
protected virtual void VisitPath<TContainer, TValue>(Property<TContainer, TValue> property, ref TContainer container, ref TValue value)
Parameters
Type | Name | Description |
---|---|---|
Property<TContainer, TValue> | property | |
TContainer | container | |
TValue | value |
Type Parameters
Name | Description |
---|---|
TContainer | |
TValue |
Explicit Interface Implementations
IPropertyBagVisitor.Visit<TContainer>(IPropertyBag<TContainer>, ref TContainer)
Implement this method to accept visitation for a property bag and container.
Declaration
void IPropertyBagVisitor.Visit<TContainer>(IPropertyBag<TContainer> properties, ref TContainer container)
Parameters
Type | Name | Description |
---|---|---|
IPropertyBag<TContainer> | properties | The properties of the container. |
TContainer | container | The container being visited. |
Type Parameters
Name | Description |
---|---|
TContainer | The container type. |
Implements
Remarks
This method is invoked by Accept(IPropertyBagVisitor, ref TContainer).
IPropertyVisitor.Visit<TContainer, TValue>(Property<TContainer, TValue>, ref TContainer)
Implement this method to accept visitation for a specific property.
Declaration
void IPropertyVisitor.Visit<TContainer, TValue>(Property<TContainer, TValue> property, ref TContainer container)
Parameters
Type | Name | Description |
---|---|---|
Property<TContainer, TValue> | property | The property being visited. |
TContainer | container | The container being visited. |
Type Parameters
Name | Description |
---|---|
TContainer | The container type. |
TValue | The value type. |
Implements
Remarks
This method is invoked by IPropertyAccept<TContainer>