UserDelegateTypeAttribute UserDelegateTypeAttribute Class

Definition

This attribute is used on delegates created by the binding generator to properly map between signatures for Objective-C blocks and their corresponding exposed managed delegates.

When binding Objective-C blocks, the binding generator will create a managed delegate whose signature is equivalent to the corresponding block's signature for the required binding code. However, this signature isn't necessarily accurate enough to re-create the block's signature at runtime (which is needed in some circumstances). This attribute makes it possible to find the type of the corresponding managed delegate that is exposed by the generated bindings, which does have enough information to re-create the corresponding block's signature.

[System.AttributeUsage(System.AttributeTargets.Delegate, AllowMultiple=false)]
public sealed class UserDelegateTypeAttribute : Attribute
type UserDelegateTypeAttribute = class
    inherit Attribute
Inheritance
UserDelegateTypeAttributeUserDelegateTypeAttribute
Attributes

Constructors

UserDelegateTypeAttribute(Type) UserDelegateTypeAttribute(Type)

Initializes a new attribute with the specified managed delegate type.

Properties

UserDelegateType UserDelegateType

The managed delegate type that corresponds to the delegate this attribute is applied to.

Applies to