Interface IPropertyStore
Represents a storage for indexed property references.
public interface IPropertyStore
- Extension Methods
Properties
TargetType
Gets the type associated with the property store.
Type TargetType { get; }
Property Value
Methods
EnumerateProperties(bool)
Enumerates all property references stored in the property store.
IEnumerable<IPropertyReference> EnumerateProperties(bool includeInherited = true)
Parameters
includeInheritedboolIndicates whether to include inherited properties.
Returns
- IEnumerable<IPropertyReference>
An enumerable collection of property references.
GetProperty(string, bool)
Retrieves a property reference by name.
IPropertyReference GetProperty(string name, bool searchInherited = true)
Parameters
namestringThe name of the property to retrieve.
searchInheritedboolIndicates whether to search inherited properties.
Returns
- IPropertyReference
The property reference associated with the specified name, or null if not found.
GetProperty<TValue>(string, bool)
Retrieves a strongly-typed property reference by name.
IPropertyReference<TValue> GetProperty<TValue>(string name, bool searchInherited = true)
Parameters
namestringThe name of the property to retrieve.
searchInheritedboolIndicates whether to search inherited properties.
Returns
- IPropertyReference<TValue>
The strongly-typed property reference associated with the specified name, or null if not found.
Type Parameters
TValueThe type of the property value.
RegisterAttached(string, Type, PropertyMetadata, ValidateValueCallback?)
Registers an attached property with the specified name and type.
IPropertyReference RegisterAttached(string name, Type propertyType, PropertyMetadata metadata, ValidateValueCallback? validationCallback = null)
Parameters
namestringThe name of the attached property.
propertyTypeTypeThe type of the attached property.
metadataPropertyMetadataMetadata associated with the property.
validationCallbackValidateValueCallbackAn optional callback for validating property values.
Returns
- IPropertyReference
The registered property reference.
RegisterAttached<TValue>(string, PropertyMetadata, ValidateValueCallback?)
Registers a strongly-typed attached property with the specified name.
IPropertyReference<TValue> RegisterAttached<TValue>(string name, PropertyMetadata metadata, ValidateValueCallback? validationCallback = null)
Parameters
namestringThe name of the attached property.
metadataPropertyMetadataMetadata associated with the property.
validationCallbackValidateValueCallbackAn optional callback for validating property values.
Returns
- IPropertyReference<TValue>
The registered strongly-typed property reference.
Type Parameters
TValueThe type of the attached property value.
RegisterProperty(string, Type, PropertyMetadata, ValidateValueCallback?)
Registers a property with the specified name and type.
IPropertyReference RegisterProperty(string name, Type propertyType, PropertyMetadata metadata, ValidateValueCallback? validationCallback = null)
Parameters
namestringThe name of the property.
propertyTypeTypeThe type of the property.
metadataPropertyMetadataMetadata associated with the property.
validationCallbackValidateValueCallbackAn optional callback for validating property values.
Returns
- IPropertyReference
The registered property reference.
RegisterProperty<TValue>(string, PropertyMetadata, ValidateValueCallback?)
Registers a property with the specified name and type.
IPropertyReference<TValue> RegisterProperty<TValue>(string name, PropertyMetadata metadata, ValidateValueCallback? validationCallback = null)
Parameters
namestringThe name of the property.
metadataPropertyMetadataMetadata associated with the property.
validationCallbackValidateValueCallbackAn optional callback for validating property values.
Returns
- IPropertyReference<TValue>
The registered strongly-typed property reference.
Type Parameters
TValueThe type of the property value.
TryGetProperty(string, out IPropertyReference?)
Attempts to retrieve a property reference by name.
bool TryGetProperty(string name, out IPropertyReference? property)
Parameters
namestringThe name of the property to retrieve.
propertyIPropertyReferenceWhen this method returns, contains the property reference associated with the specified name, or null if not found.
Returns
TryGetProperty(string, bool, out IPropertyReference?)
Attempts to retrieve a property reference by name.
bool TryGetProperty(string name, bool searchInherited, out IPropertyReference? property)
Parameters
namestringThe name of the property to retrieve.
searchInheritedboolIndicates whether to search inherited properties.
propertyIPropertyReferenceWhen this method returns, contains the property reference associated with the specified name, or null if not found.
Returns
TryGetProperty<TValue>(string, out IPropertyReference<TValue>?)
Attempts to retrieve a strongly-typed property reference by name.
bool TryGetProperty<TValue>(string name, out IPropertyReference<TValue>? property)
Parameters
namestringThe name of the property to retrieve.
propertyIPropertyReference<TValue>When this method returns, contains the strongly-typed property reference associated with the specified name, or null if not found.
Returns
Type Parameters
TValueThe type of the property value.
TryGetProperty<TValue>(string, bool, out IPropertyReference<TValue>?)
Attempts to retrieve a strongly-typed property reference by name.
bool TryGetProperty<TValue>(string name, bool searchInherited, out IPropertyReference<TValue>? property)
Parameters
namestringThe name of the property to retrieve.
searchInheritedboolIndicates whether to search inherited properties.
propertyIPropertyReference<TValue>When this method returns, contains the strongly-typed property reference associated with the specified name, or null if not found.
Returns
Type Parameters
TValueThe type of the property value.