Table of Contents

Class ObjectHierarchyOptions

Namespace
Cuemon.Reflection
Assembly
Cuemon.Core.dll

Specifies options that is related to Hierarchy and HierarchySerializer operations.

public class ObjectHierarchyOptions : IParameterObject
Inheritance
Object
ObjectHierarchyOptions
Implements

Constructors

ObjectHierarchyOptions()

Initializes a new instance of the ObjectHierarchyOptions class.

public ObjectHierarchyOptions()

Properties

HasCircularReference

Gets or sets the function delegate that is invoked when a property has a value and whose return value suggest a circular reference.

public Func<object, bool> HasCircularReference { get; set; }

Property Value

Func<Object, Boolean>

A System.Func<TResult> that determines if an object is suggesting a circular reference.

MaxCircularCalls

Gets or sets the maximum amount of times an object is allowed to make circular calls. Default is 2.

public int MaxCircularCalls { get; set; }

Property Value

Int32

The maximum amount of times an object is allowed to make circular calls.

MaxDepth

Gets or sets the maximum depth to safely traverse an object hierarchy. Default is 10.

public int MaxDepth { get; set; }

Property Value

Int32

The maximum depth to safely traverse an object hierarchy.

ReflectionRules

Gets or sets the binding constraints for reflection based member searching.

public MemberReflection ReflectionRules { get; set; }

Property Value

MemberReflection

The binding constraints for reflection based member searching.

Exceptions

System.ArgumentNullException

value cannot be null.

SkipProperty

Gets or sets the function delegate that is invoked every time a public property is iterated and whose System.Reflection.PropertyInfo determine if that property should be skipped or not.

public Func<PropertyInfo, bool> SkipProperty { get; set; }

Property Value

Func<PropertyInfo, Boolean>

A System.Func<TResult> that determines if a given System.Reflection.PropertyInfo should be skipped or not.

SkipPropertyType

Gets or sets the function delegate that is invoked just before public properties is being iterated and whose return System.Type determine if the properties should be skipped or not.

public Func<Type, bool> SkipPropertyType { get; set; }

Property Value

Func<Type, Boolean>

A System.Func<TResult> that determines if a given property System.Type should be skipped or not.

ValueResolver

Gets or sets the function delegate that is invoked when a property can be read and is of same type as the underlying System.Type of the source object.

public Func<object, PropertyInfo, object> ValueResolver { get; set; }

Property Value

Func<Object, PropertyInfo, Object>

A function delegate that is invoked when a property can be read and is of same type as the underlying System.Type of the source object.

See Also