Allows a .NET interface to be registered within the Objective-C runtime.
When a native instance is returned, the Objective-C runtime provides a wrapper that allows calls to the native instance through the methods of the interface.


All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
![]() | ObjectiveCProtocolAttribute()()()() |
Initializes a new instance of the ObjectiveCProtocolAttribute class.
|
![]() | ObjectiveCProtocolAttribute(String) |
Initializes a new instance of the ObjectiveCProtocolAttribute class.
|
![]() | Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute.) |
![]() | Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) |
![]() | GetHashCode()()()() |
Returns the hash code for this instance.
(Inherited from Attribute.) |
![]() | GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) |
![]() | IsDefaultAttribute()()()() |
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute.) |
![]() | Match(Object) |
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute.) |
![]() | MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) |
![]() | Name |
Gets or sets the name to use when registering the interface in the Objective-C runtime.
|
![]() | ToString()()()() | (Overrides Object.ToString()()()().) |
![]() | TypeId |
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.) |

The following example shows how to use the ObjectiveCProtocolAttribute attribute.
The type MyOwnType1 will be registered with the "MyOwnType1" name.
CopyC#
[ObjectiveCProtocolAttribute]
public interface MyOwnInterface1
{
...
}
The type MyOwnType2 will be registered with the "Type2" name.
CopyC#
[ObjectiveCProtocolAttribute("Interface2")]
public interface MyOwnInterface2
{
...
}

- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)