Class PropertyVisitExtensions
A set of property extension methods for visitation.
Namespace: Unity.Properties
Syntax
public static class PropertyVisitExtensions : object
Methods
Visit<TValue>(IProperty, PropertyVisitor, ref TValue)
Call this method to net visit all the elements of the given value.
Declaration
public static void Visit<TValue>(this IProperty property, PropertyVisitor visitor, ref TValue value)
Parameters
Type | Name | Description |
---|---|---|
IProperty | property | |
PropertyVisitor | visitor | The property visitor to use. |
TValue | value | The value to visit. |
Type Parameters
Name | Description |
---|---|
TValue | The value type for this property. |
Visit<TValue>(IProperty, PropertyVisitor, ref TValue, Int32)
Visits a specific element of the given container by index.
Declaration
public static void Visit<TValue>(this IProperty property, PropertyVisitor visitor, ref TValue container, int index)
Parameters
Type | Name | Description |
---|---|---|
IProperty | property | The property this method extends. |
PropertyVisitor | visitor | The visitor to use. |
TValue | container | The container to visit. |
Int32 | index | The index to visit at. |
Type Parameters
Name | Description |
---|---|
TValue | The value type for this property. |
Remarks
This method can be used to selectively visit list elements while maintaining the visit context.
Visit<TValue>(IProperty, PropertyVisitor, ref TValue, Object)
Visits a specific element of the given container by key.
Declaration
public static void Visit<TValue>(this IProperty property, PropertyVisitor visitor, ref TValue container, object key)
Parameters
Type | Name | Description |
---|---|---|
IProperty | property | The property this method extends. |
PropertyVisitor | visitor | The visitor to use. |
TValue | container | The container to visit. |
Object | key | The key to visit at. |
Type Parameters
Name | Description |
---|---|
TValue | The value type for this property. |
Remarks
This method can be used to selectively visit dictionary elements while maintaining the visit context.