addToBuilder static method
void
addToBuilder(})
Adds the implementation of the NSDiscardableContent 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, {
required bool Function() beginContentAccess,
required void Function() endContentAccess,
required void Function() discardContentIfPossible,
required bool Function() isContentDiscarded,
bool $keepIsolateAlive = true,
}) {
NSDiscardableContent.beginContentAccess.implement(
builder,
beginContentAccess,
);
NSDiscardableContent.endContentAccess.implement(builder, endContentAccess);
NSDiscardableContent.discardContentIfPossible.implement(
builder,
discardContentIfPossible,
);
NSDiscardableContent.isContentDiscarded.implement(
builder,
isContentDiscarded,
);
builder.addProtocol($protocol);
}