implement static method
NSConnectionDelegate
implement({
- bool makeNewConnection_sender_()?,
- bool connection_shouldMakeNewConnection_()?,
- NSData authenticationDataForComponents_(
- NSArray
- bool authenticateComponents_withData_(
- NSArray,
- NSData
- ObjCObjectBase createConversationForConnection_()?,
- bool connection_handleRequest_()?,
- bool $keepIsolateAlive = true,
Builds an object that implements the NSConnectionDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSConnectionDelegate implement({
bool Function(NSConnection, NSConnection)? makeNewConnection_sender_,
bool Function(NSConnection, NSConnection)?
connection_shouldMakeNewConnection_,
objc.NSData Function(objc.NSArray)? authenticationDataForComponents_,
bool Function(objc.NSArray, objc.NSData)? authenticateComponents_withData_,
objc.ObjCObjectBase Function(NSConnection)?
createConversationForConnection_,
bool Function(NSConnection, NSDistantObjectRequest)?
connection_handleRequest_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSConnectionDelegate');
NSConnectionDelegate.makeNewConnection_sender_.implement(
builder,
makeNewConnection_sender_,
);
NSConnectionDelegate.connection_shouldMakeNewConnection_.implement(
builder,
connection_shouldMakeNewConnection_,
);
NSConnectionDelegate.authenticationDataForComponents_.implement(
builder,
authenticationDataForComponents_,
);
NSConnectionDelegate.authenticateComponents_withData_.implement(
builder,
authenticateComponents_withData_,
);
NSConnectionDelegate.createConversationForConnection_.implement(
builder,
createConversationForConnection_,
);
NSConnectionDelegate.connection_handleRequest_.implement(
builder,
connection_handleRequest_,
);
builder.addProtocol($protocol);
return NSConnectionDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}