SourceAttribute class

Namespace: CodeEffects.Rule.Attributes
Assembly: CodeEffects.Rule.dll


[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class SourceAttribute : System.Attribute

When applied to a public class, marks this class as a source object. This attribute is optional. Source objects are a cornerstone element of Code Effects. See the source object topic for details.


  • DeclaredMembersOnly Type: System.Boolean

    Gets or sets the value indicating whether Code Effects component should only use public members declared by the source object and disregard members of its base class(es). The default value is False. Notice that members of the System.Object class are ignored by Code Effects regardless of the value of this property. This property plays an important role in the technique of preserving attributes in auto-generated classes.

  • MaxTypeNestingLevel Type: System.Int32

    Code Effects component performs a recursive search of all reference type members of the source object and includes all their value type members not decorated with ExcludeFromEvaluationAttribute as rule fields. The recursive search for value type members is performed up to the level set by this optional property. The default value is 4. Setting the MaxTypeNestingLevel to a higher number may slow down the performance of the Rule Editor while it renders itself on a page.

  • PersistTypeNameInRuleXml Type: System.Boolean

    Gets or sets the value indicating whether Code Effects component should store the name of the source object's type in the Rule XML. The default value is True. Set the value of this property to False if you generate source objects dynamically and don't know their types at design time.


using CodeEffects.Rule.Attributes;

namespace TestLibrary
	[Source(MaxTypeNestingLevel = 2)]
	public class Test
		// ...
Post your support requests on You can also post your comments and product feedback using the form at the bottom of this page.
Comments: 0
Name (optional):
Comment (URLs are allowed and must start with http:// or https://; all tags will be encoded):
Remaining character count: