Class TypeReferenceAnalyzer

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Analyses a type looking for properties of a specified type.

Inheritance
System.Object
TypeReferenceAnalyzer
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
[ServiceConfiguration(typeof(TypeReferenceAnalyzer))]
[ServiceConfiguration(typeof(ITypeReferenceAnalyzer), IncludeServiceAccessor = false)]
public class TypeReferenceAnalyzer : ITypeReferenceAnalyzer
Remarks

Recursively goes through the public properties of a type and searches for those of a specified typed. Will throw exception if a circular reference is encountered.

Only properties with a public get and set accessor will be validated.

Constructors

TypeReferenceAnalyzer()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the TypeReferenceAnalyzer class.

Declaration
public TypeReferenceAnalyzer()

Methods

Analyze<T>(Type)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Analyze a type for occurrances of a specified base type

Declaration
public IEnumerable<Type> Analyze<T>(Type type)
Parameters
Type Name Description
System.Type type

The type to analyze.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>

The types found matching the T parameter. Ordered with the deepest matches first.

Type Parameters
Name Description
T

The public properties have to inherit from this type to be considered a match.

Remarks

Analyze a type looking for properties of a specified type. Will do so recursivly using reflection on public properties with getter and setter.

Validates if any property of a specific type creates a circular reference. Will throw an exception in that case.

Exceptions
Type Condition
System.InvalidOperationException

If circular references are found

Implements

Extension Methods