addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. ObjCObjectBase? archiver_willEncodeObject_(
    1. NSKeyedArchiver,
    2. ObjCObjectBase
    )?,
  3. void archiver_didEncodeObject_(
    1. NSKeyedArchiver,
    2. ObjCObjectBase?
    )?,
  4. void archiver_willReplaceObject_withObject_(
    1. NSKeyedArchiver,
    2. ObjCObjectBase?,
    3. ObjCObjectBase?
    )?,
  5. void archiverWillFinish_(
    1. NSKeyedArchiver
    )?,
  6. void archiverDidFinish_(
    1. NSKeyedArchiver
    )?,
  7. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSKeyedArchiverDelegate protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

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

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  objc.ObjCObjectBase? Function(NSKeyedArchiver, objc.ObjCObjectBase)?
  archiver_willEncodeObject_,
  void Function(NSKeyedArchiver, objc.ObjCObjectBase?)?
  archiver_didEncodeObject_,
  void Function(NSKeyedArchiver, objc.ObjCObjectBase?, objc.ObjCObjectBase?)?
  archiver_willReplaceObject_withObject_,
  void Function(NSKeyedArchiver)? archiverWillFinish_,
  void Function(NSKeyedArchiver)? archiverDidFinish_,
  bool $keepIsolateAlive = true,
}) {
  NSKeyedArchiverDelegate.archiver_willEncodeObject_.implement(
    builder,
    archiver_willEncodeObject_,
  );
  NSKeyedArchiverDelegate.archiver_didEncodeObject_.implementAsBlocking(
    builder,
    archiver_didEncodeObject_,
  );
  NSKeyedArchiverDelegate.archiver_willReplaceObject_withObject_
      .implementAsBlocking(builder, archiver_willReplaceObject_withObject_);
  NSKeyedArchiverDelegate.archiverWillFinish_.implementAsBlocking(
    builder,
    archiverWillFinish_,
  );
  NSKeyedArchiverDelegate.archiverDidFinish_.implementAsBlocking(
    builder,
    archiverDidFinish_,
  );
  builder.addProtocol($protocol);
}