Struct PropertyPathPart
A PropertyPathPart represents a single element of the path.
Inherited Members
Namespace: Unity.Properties
Syntax
public readonly struct PropertyPathPart : IEquatable<PropertyPathPart>
Remarks
Constructors
PropertyPathPart(Int32)
Initializes a new PropertyPathPart with the specified index.
Declaration
public PropertyPathPart(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the part. |
PropertyPathPart(Object)
Initializes a new PropertyPathPart with the specified key.
Declaration
public PropertyPathPart(object key)
Parameters
Type | Name | Description |
---|---|---|
Object | key | The key of the part. |
PropertyPathPart(String)
Initializes a new PropertyPathPart with the specified name.
Declaration
public PropertyPathPart(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the part. |
Properties
Index
The Index of the part. This will only be set when using Index
Declaration
public readonly int Index { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsIndex
Returns true if the part is Index.
Declaration
public readonly bool IsIndex { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsKey
Returns true if the part is Key.
Declaration
public readonly bool IsKey { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsName
Returns true if the part is Name.
Declaration
public readonly bool IsName { get; }
Property Value
Type | Description |
---|---|
Boolean |
Key
The Key of the part. This will only be set when using Key
Declaration
public readonly object Key { get; }
Property Value
Type | Description |
---|---|
Object |
Kind
The PropertyPathPartKind for this path. This determines how algorithms will resolve the path.
Declaration
public readonly PropertyPathPartKind Kind { get; }
Property Value
Type | Description |
---|---|
PropertyPathPartKind |
Name
The Name of the part. This will only be set when using Name
Declaration
public readonly string Name { get; }
Property Value
Type | Description |
---|---|
String |
Methods
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(PropertyPathPart)
Indicates whether this instance and a specified object are equal.
Declaration
public readonly bool Equals(PropertyPathPart other)
Parameters
Type | Name | Description |
---|---|---|
PropertyPathPart | other | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
Boolean | true if obj and this instance are the same type and represent the same value; otherwise, false. |
Implements
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
ToString()
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
String |