addToBuilder static method
void
addToBuilder(
- ObjCProtocolBuilder builder, {
- void URLSession_didBecomeInvalidWithError_(
- NSURLSession,
- NSError?
- void URLSession_didReceiveChallenge_completionHandler_(
- NSURLSession,
- NSURLAuthenticationChallenge,
- ObjCBlock<
Void Function(NSInteger, NSURLCredential?)>
- void URLSessionDidFinishEventsForBackgroundURLSession_()?,
- bool $keepIsolateAlive = true,
Adds the implementation of the NSURLSessionDelegate 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, {
void Function(NSURLSession, objc.NSError?)?
URLSession_didBecomeInvalidWithError_,
void Function(
NSURLSession,
NSURLAuthenticationChallenge,
objc.ObjCBlock<ffi.Void Function(NSInteger, NSURLCredential?)>,
)?
URLSession_didReceiveChallenge_completionHandler_,
void Function(NSURLSession)?
URLSessionDidFinishEventsForBackgroundURLSession_,
bool $keepIsolateAlive = true,
}) {
NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_.implement(
builder,
URLSession_didBecomeInvalidWithError_,
);
NSURLSessionDelegate
.URLSession_didReceiveChallenge_completionHandler_.implement(
builder,
URLSession_didReceiveChallenge_completionHandler_,
);
NSURLSessionDelegate
.URLSessionDidFinishEventsForBackgroundURLSession_.implement(
builder,
URLSessionDidFinishEventsForBackgroundURLSession_,
);
builder.addProtocol($protocol);
}