ExportAttribute Class

Definition

Exports a method or property to the Objective-C world.

[System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property)]
public class ExportAttribute : Attribute
type ExportAttribute = class
    inherit Attribute
Inheritance
ExportAttribute
Derived
Attributes

Remarks

This attribute is applied to properties and methods in classes that derive from NSObject to export the value to the Objective-C world. This can be used either to respond to messages or to override an Objective-C method.

public class Test : SomeBaseClass {
    [Export ("setText:withFont:")]
    public void SetText (string text, string font)
    {
    }
}

Constructors

ExportAttribute()

Use this method to expose a C# method, property or constructor as a method that can be invoked from Objective-C.

ExportAttribute(String)

Exports the given method or property to Objective-C land with the specified method name.

ExportAttribute(String, ArgumentSemantic)

Use this method to expose a C# method, property or constructor as a method that can be invoked from Objective-C.

Properties

ArgumentSemantic

The semantics for object ownership on setter properties or methods.

IsVariadic
Selector

The name of the C# selector if specified, or null if it is derived from the property name or method.

Methods

ToGetter(PropertyInfo)
ToSetter(PropertyInfo)

Applies to