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
setupAction<MemberReflectionOptions>The MemberReflectionOptions which need to be configured.
MemberReflection(bool, bool, bool, bool)
Initializes a new instance of the MemberReflection class.
public MemberReflection(bool excludePrivate = false, bool excludeStatic = false, bool excludeInheritancePath = false, bool excludePublic = false)
Parameters
excludePrivateboolif set to
truenon-public members are excluded from the binding constraint.excludeStaticboolif set to
truestatic members are excluded from the binding constraint.excludeInheritancePathboolif set to
truederived members of a type's inheritance path are excluded from the binding constraint.excludePublicboolif set to
truepublic 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 = Instance | Static | Public | NonPublic
Field Value
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
setupAction<MemberReflectionOptions>The MemberReflectionOptions that may be configured.
Returns
- BindingFlags
The binding constraint as defined by the
setup.
Operators
implicit operator BindingFlags(MemberReflection)
Performs an implicit conversion from MemberReflection to BindingFlags.
public static implicit operator BindingFlags(MemberReflection mr)
Parameters
mrMemberReflectionThe MemberReflection to convert.
Returns
- BindingFlags
A BindingFlags that is equivalent to
mr.