Table of Contents

Struct PropertyPath.PathSegment

Namespace
Icy.Data.Bindings
Assembly
IcyUI.dll

Represents a segment of the PropertyPath.

protected readonly struct PropertyPath.PathSegment
Inherited Members
Extension Methods

Fields

Params

Gets the parameters to call the indexer.

public readonly object?[]? Params

Field Value

object[]

Property

Gets the property info to get the value from.

public readonly PropertyInfo? Property

Field Value

PropertyInfo

Reference

Gets the registered property reference to get the value from, when the target type has one.

public readonly IPropertyReference? Reference

Field Value

IPropertyReference

Remarks

Set for properties registered through PropertyRegistry (see RegisterReferenceAttribute), so that binding through a path segment participates in the same value-precedence system as styles, visual states, and animations. Falls back to Property for everything else, including plain BCL types that were never registered.

ResultType

Gets the type of the calculation result.

public readonly Type ResultType

Field Value

Type

Properties

IsArray

Gets a value indicating whether the target type is an array.

[MemberNotNullWhen(true, "Params")]
public bool IsArray { get; init; }

Property Value

bool

IsReadOnly

Gets a value indicating whether the path segment can't be assigned to.

public bool IsReadOnly { get; init; }

Property Value

bool

Methods

FromIndexer(Type, string[])

Gets an indexer call segment.

public static PropertyPath.PathSegment FromIndexer(Type target, string[] arguments)

Parameters

target Type

Target type to call the indexer for.

arguments string[]

Array of arguments to access the indexer for.

Returns

PropertyPath.PathSegment

An instance of the PropertyPath.PathSegment struct for the indexer access.

FromProperty(Type, string, PropertyRegistry?)

Gets a property call segment.

public static PropertyPath.PathSegment FromProperty(Type target, string propertyName, PropertyRegistry? registry = null)

Parameters

target Type

Target type to get the property for.

propertyName string

A property name to search the property.

registry PropertyRegistry

The registry to resolve a registered property through, or null to use Current.

Returns

PropertyPath.PathSegment

An instance of the PropertyPath.PathSegment struct for the property access.

GetValue(object)

Gets the value of an object for the current path segment.

public object? GetValue(object obj)

Parameters

obj object

An object to get the value from.

Returns

object

Value of the defined property of the specified object.

SetValue(object, object?)

Sets the value of an object for the current path segment.

public void SetValue(object target, object? value)

Parameters

target object

An object to set the value to.

value object

The value to set.