Düzenle

Aracılığıyla paylaş


Protocol Constructors

Definition

Overloads

Protocol(IntPtr)

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

Protocol(String)

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

Protocol(Type)

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

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

nativeint

Objective-C pointer to the protocol.

Applies to

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

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.

Applies to

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

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

Applies to