The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!
A PropertyRoute represents a sequence of PropertyInfo objects, starting from the System.Type of a root entity (either an Entity or a ModelEntity). It unambiguously identifies a logical database column.
There is only one canonical representation of a PropertyRoute because inheritance is not supported, and the sequence of PropertyInfo cannot traverse to a different Entity.
PropertyRoute is a key concept for property authorization and for overriding FieldAttributes.
The PropertyRouteType enum defines the possible types of property routes:
"(OrderEntity)".PropertyInfo or FieldInfo. This is the only complete type of a PropertyRoute, e.g., "(OrderEntity).CancellationDate"."(OrderEntity)[CorruptMixin]".Entity property of a Lite<T>, e.g., "(OrderEntity).Employee.Entity"."(OrderEntity).Details[0]".The main members of the PropertyRoute class are:
public class PropertyRoute : IEquatable<PropertyRoute>, ISerializable
{
public PropertyRouteType PropertyRouteType { get; }
public FieldInfo? FieldInfo { get; } // Optional
public PropertyInfo? PropertyInfo { get; } // Optional
public PropertyRoute? Parent { get; } // Null for PropertyRouteType.Root
public Type Type { get; } // The type returned by this PropertyRoute
public Type RootType { get; } // The type of the top-most parent (Root)
}PropertyRoute provides methods for string representation and parsing:
public class PropertyRoute
{
public override string ToString(); // Returns e.g. '(OrderEntity).Details[0].SubTotalPrice'
public string PropertyString(); // Returns just 'Details[0].SubTotalPrice'
public static PropertyRoute Parse(Type rootType, string propertyString); // Parses a propertyString given the rootType
}© Signum Software. All Rights Reserved.
Powered by Signum Framework