Protocol Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Protocol(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| 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(NativeHandle)
A constructor used when creating managed representations of unmanaged objects. Called by the runtime.
public Protocol(ObjCRuntime.NativeHandle handle);
new ObjCRuntime.Protocol : ObjCRuntime.NativeHandle -> ObjCRuntime.Protocol
Parameters
- handle
- NativeHandle
Pointer (handle) to the unmanaged object.
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).