addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. bool makeNewConnection_sender_(
    1. NSConnection,
    2. NSConnection
    )?,
  3. bool connection_shouldMakeNewConnection_(
    1. NSConnection,
    2. NSConnection
    )?,
  4. NSData authenticationDataForComponents_(
    1. NSArray
    )?,
  5. bool authenticateComponents_withData_(
    1. NSArray,
    2. NSData
    )?,
  6. ObjCObjectBase createConversationForConnection_(
    1. NSConnection
    )?,
  7. bool connection_handleRequest_(
    1. NSConnection,
    2. NSDistantObjectRequest
    )?,
  8. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSConnectionDelegate protocol to an existing objc.ObjCProtocolBuilder.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilder(
  objc.ObjCProtocolBuilder builder, {
  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,
}) {
  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);
}