Class FunctionPointerAttribute
Indicates that the source generator should generate extension members for all function pointer types for the specified delegate type,
using the optionally specified CallConvs as the calling conventions of the target function that is invoked by the generated method.
Inherited Members
Namespace: SemPtr
Assembly: SemPtr.dll
Syntax
[AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false)]
public sealed class FunctionPointerAttribute : Attribute
Remarks
Forces the source generator to generate extension members for all function pointer types for the specified delegate type.
You can specify the CallConvs property to indicate the calling conventions of the target function that is invoked by the generated method. Specifying this property takes priority over any UnmanagedFunctionPointerAttribute that may be applied to the target delegate type.
Note that the target delegate type must be at least internally accessible.
You can specify this attribute on delegate type declarations. If you don't control the source code of the delegate type, you can alternatively specify a FunctionPointerAttribute<TDelegate> attribute at the assembly level to achieve the same effect with externally defined delegate types.
Properties
| Name | Description |
|---|---|
| CallConvs | Gets or initializes the calling conventions that should be used for the generated |