PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Custom­Attribute­Helper Class / Custom­Attribute­Helper Methods / Custom­Attribute­Helper.​Emit­Custom­Attribute­Construction Method

CustomAttributeHelper.EmitCustomAttributeConstruction Method

Emits instructions that construct a custom attribute.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public static void EmitCustomAttributeConstruction(
	IAnnotationValue attribute,
	BaseInstructionWriter writer,
	Func<IMember, bool> filter
)

Parameters

attribute
Type: PostSharp.Sdk.CodeModel.IAnnotationValue
The custom attribute to construct.
writer
Type: PostSharp.Sdk.CodeModel.BaseInstructionWriter
An BaseInstructionWriter.
filter
Type: System.Func<IMember, Boolean>
A predicate on named arguments, determining if a member should be emitted (return true) or ignored (return false).
Remarks
Stack transition: ... -> Ref(Of attribute.Constructor.DeclaringType), ... .
See Also