Table of Contents

Class MemberReflection

Namespace
Cuemon.Reflection
Assembly
Cuemon.Core.dll

Provides a robust way specifying binding constraints for reflection based member searching.

public class MemberReflection
Inheritance
MemberReflection

Constructors

MemberReflection(Action<MemberReflectionOptions>)

Initializes a new instance of the MemberReflection class.

public MemberReflection(Action<MemberReflectionOptions> setup)

Parameters

setup Action<MemberReflectionOptions>

The MemberReflectionOptions which need to be configured.

MemberReflection(Boolean, Boolean, Boolean, Boolean)

Initializes a new instance of the MemberReflection class.

public MemberReflection(bool excludePrivate = false, bool excludeStatic = false, bool excludeInheritancePath = false, bool excludePublic = false)

Parameters

excludePrivate Boolean

if set to true non-public members are excluded from the binding constraint.

excludeStatic Boolean

if set to true static members are excluded from the binding constraint.

excludeInheritancePath Boolean

if set to true derived members of a type's inheritance path are excluded from the binding constraint.

excludePublic Boolean

if set to true public members are excluded from the binding constraint.

Fields

Everything

Defines a binding constraint that allows searching all members of a given type.

public const BindingFlags Everything = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic

Field Value

BindingFlags

Properties

Flags

Gets the binding constraint of this instance.

public BindingFlags Flags { get; }

Property Value

BindingFlags

The binding constraint of this instance.

Methods

CreateFlags(Action<MemberReflectionOptions>)

Creates the binding constraint needed for reflection using the optional setup to reduce the scope. Default is Everything.

public static BindingFlags CreateFlags(Action<MemberReflectionOptions> setup = null)

Parameters

setup Action<MemberReflectionOptions>

The MemberReflectionOptions that may be configured.

Returns

BindingFlags

The binding constraint as defined by the setup.

Operators

Implicit(MemberReflection to BindingFlags)

Performs an implicit conversion from MemberReflection to BindingFlags.

public static implicit operator BindingFlags(MemberReflection mr)

Parameters

mr MemberReflection

The MemberReflection to convert.

Returns

BindingFlags

A BindingFlags that is equivalent to mr.