SemPtr SemPtr
SemPtr SemPtr
Documentation generated with DocFX
Using SingulinkFX as the template

Search Results for

    Edit this page

    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.

    Inheritance
    object
    Attribute
    FunctionPointerAttribute
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 extension members for invoking the function pointer.

    © 2026 Felix Rüdiger. SemPtr and its documentation are licensed under the MIT license.