PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Infrastructure Namespace / Aspect­Infrastructure­Task Class / Aspect­Infrastructure­Task Methods / Aspect­Infrastructure­Task.​Get­Redirected­Declaration Method

AspectInfrastructureTask.GetRedirectedDeclaration Method

Gets the declaration to which another declaration has been redirected by the aspect infrastructure (typically, fields are changed into properties).

Namespace:  PostSharp.Sdk.AspectInfrastructure
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public static IMetadataDeclaration GetRedirectedDeclaration(
	IMetadataDeclaration originalDeclaration,
	bool recursive
)

Parameters

originalDeclaration
Type: PostSharp.Sdk.CodeModel.IMetadataDeclaration
The original declaration (typically, a field).
recursive
Type: System.Boolean
true if multiple levels of redirection should be considered, otherwise false.

Return Value

Type: IMetadataDeclaration
The declaration to which originalDeclaration has been redirected, or originalDeclaration itself.
See Also