Protocol Protocol Constructors

Definition

Overloads

Protocol(IntPtr) Protocol(IntPtr)

Creates an instance of the Protocol class for the specified Objective-C protocol.

Protocol(String) Protocol(String)

Creates an instance of Protocol by looking up the protocol by name.

Protocol(Type) Protocol(Type)

Creates an instance of the Protocol class for the specified managed type (which must represent an Objective-C protocol).

Protocol(IntPtr) Protocol(IntPtr)

Creates an instance of the Protocol class for the specified Objective-C protocol.

public Protocol (IntPtr handle);
new ObjCRuntime.Protocol : nativeint -> ObjCRuntime.Protocol

Parameters

handle
IntPtr IntPtr

Objective-C pointer to the protocol.

Protocol(String) Protocol(String)

Creates an instance of Protocol by looking up the protocol by name.

public Protocol (string name);
new ObjCRuntime.Protocol : string -> ObjCRuntime.Protocol

Parameters

name
String String

Name of the protocol.

Remarks

This method throws an ArgumentException if the protocol specified by name does not exist.

The GetHandle(String) method performs a similar role, except it only returns the low-level handle to the protocol.

Protocol(Type) Protocol(Type)

Creates an instance of the Protocol class for the specified managed type (which must represent an Objective-C protocol).

public Protocol (Type type);
new ObjCRuntime.Protocol : Type -> ObjCRuntime.Protocol

Parameters

type
Type Type

The managed type (which must represent an Objective-C protocol).

Applies to