UseParentFullNamePaths
Type: System.Bool
Gets or sets a value indicating whether the Rule Editor should use dot notation instead of the declared names of reference types when assigning DisplayName
values to rule fields, in-rule methods, and rule actions during the recursive search for value-type properties and qualified methods. The default value is false
.
Remarks
Consider a plain Parent
class with no Code Effects attributes applied:
namespace HelloWorld
{
public class Parent
{
public Child Test { get; set; }
}
public class Child
{
public Address Home { get; set; }
public Address Work { get; set; }
}
public class Address
{
public string Street { get; set; }
public string Zip { get; set; }
}
}
If we run an imaginary web app with the Rule Editor and the Parent
class as its source object, we would see the following fields menu:

This menu works as expected. However, you would likely want to display more readable names for your fields, even if they are buried deep within your source object. If we decorate this class with the SourceAttribute
, set the value of its UseParentFullNamePaths
property to true
, decorate the members of the Address
class with the ParentAttribute
, and use dot notation to define the exact path of each reference type down to its value types ...
using CodeEffects.Rule,Common.Attributes;
namespace HelloWorld
{
[Source(UseParentFullNamePaths = true)]
public class Patient
{
public Middle Test { get; set; }
}
public class Middle
{
public Address Home { get; set; }
public Address Work { get; set; }
}
public class Address
{
[Parent("Test.Home", "Home Street")]
[Parent("Test.Work", "Work Street")]
public string Street { get; set; }
[Parent("Test.Home", "Home Zip")]
[Parent("Test.Work", "Work Zip")]
public string Zip { get; set; }
}
}
... and then run the project again, we get the result we were looking for:

As you can see, this property works well in combination with ParentAttribute.ParentName
when the structure of the source object is more complex than a single level of reference-type properties, or when the exact structure of the source is not known at design time. If the value of this property is set to true
, you can use paths with any number of levels as the value of ParentAttribute.ParentName
, such as Test.One.Two.Three.Home
.