[This is preliminary documentation and is subject to change.]
C# |
public static Object TraverseFrom( Persistent start, string navigationPath )
- start (Persistent)
- The object to start the traverse from. May be null.
- navigationPath (String)
- The path to traverse.
The navigation path should consist of public property names. Reflection is used to access the object which is the value of the named property at each node in the traverse. In other words, assuming prop1 prop2 and prop3 are public properties, then
TraverseFrom(obj, "prop1.prop2.prop3");
is equivalent to
obj.prop1.prop2.prop3;
If at any point in the traverse, a node value is null, then null is returned without an exception being created.
The navigation path may start with "The" in which case the second node in the path must be "Internet", "Domain", "Environment" or any singleton class name in the running Package. In this case the start object is not used in the traverse and can be null.