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
is a sequence of PropertyInfo
, starting from a System.Type
of an root entity (a Entity
or a ModelEntity
) that ultimately refers unambiguously to a logical database column.
There's just one canonical representation of a PropertyRoute
because inheritance is not supported, neither the sequence of PropertyInfo
can travel to a different Entity
.
A PropertyRoute
is an important concept to authorize properties, and override FieldAttributes.
There are just a few different types of property routes, defined by PropertyRouteType
enum:
"(OrderEntity)"
PropertyInfo
or FieldInfo
.This is the only complete type of a PropertyRoute
. i.e: "(OrderEntity).CancellationDate"
."(OrderEntity)[CorruptMixin]"
Entity
of a Lite<T>
. Like "(OrderEntity).Employee.Entity"
.Lite<T>
. Like "(OrderEntity).Details[0]"
.Here are the members of a PropertyRoute
:
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; } // returning type of this PropertyRoute
public Type RootType { get; } // Type of the top-most parent (Root)
}
PropertyRoute
have ToString
defined and can also be parsed:
public class PropertyRoute
{
public override string ToString() //returns '(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