Class PropertyNameMetadata
Represents a serialization metadata for property names and paths.
Inheritance
Namespace: Telerik.Windows.Persistence.SerializationMetadata
Assembly: Telerik.Windows.PersistenceFramework.dll
Syntax
public class PropertyNameMetadata : Object, ISerializationMetadata
Constructors
PropertyNameMetadata()
Declaration
public PropertyNameMetadata()
Properties
Condition
Gets or sets a value indicating whether this property is included or excluded from the serialization.
Declaration
public SerializationMetadataCondition Condition { get; set; }
Property Value
SerializationMetadataCondition
The condition. |
Expression
Gets or sets the expression that will be used as a base for a Regex that will match properties based on the SearchType.
Declaration
public string Expression { get; set; }
Property Value
System.String
|
Examples
If you want to match only the property "Width" - use the expression "^\b(Width)\b$", without the quotes. If you want to match the "Width", "MinWidth" and "MaxWidth" - use the expression "Width", without the quotes.
IsRecursive
Gets or sets a value indicating whether this instance is recursive.
Declaration
public bool IsRecursive { get; set; }
Property Value
System.Boolean
|
SearchType
Gets or sets a value indicating whether the search is based on the property name or a property path.
Declaration
public MetadataSearchCriteria SearchType { get; set; }
Property Value
MetadataSearchCriteria
The type of the search. |
Methods
ShouldSerialize(PropertyInfo, String)
Determines whether a property should be serialized based on the current settings.
Declaration
public MatchResult ShouldSerialize(PropertyInfo property, string propertyPath)
Parameters
System.Reflection.PropertyInfo
property
The property to evaluate. |
System.String
propertyPath
The property path to evaluate. |
Returns
MatchResult
|