Open sandboxFocus

Class ReflectionExtensions

Provides utility methods to work with the System.Reflection namespace.

Inheritance
ReflectionExtensions
Namespace: PostSharp.Reflection
Assembly: PostSharp.dll
Syntax
public static class ReflectionExtensions

Methods

Name Description
GetAutomaticProperty(FieldInfo)

Gets the PropertyInfo of which a given field is the backing field, in the current type or its base types.

GetAutomaticProperty(FieldInfo, bool)

Gets the PropertyInfo of which a given field is the backing field. The inherit parameter specifies whether base types should be considered.

GetBackingField(PropertyInfo)

Gets the backing field of a given property.

GetStateMachineKind(MethodInfo)

Gets the kind of state machine (for example, Async, Iterator or None) that implements a given method.

GetStateMachinePublicMethod(MethodInfo)

Gets the public (or kick-off) method given a MoveNext method.

IsAutomaticProperty(PropertyInfo)

Determines whether a given property is an automatic property.