addToBuilderAsBlocking static method
void
addToBuilderAsBlocking(
- ObjCProtocolBuilder builder, {
- void connection_didFailWithError_(
- NSURLConnection,
- NSError
- bool connectionShouldUseCredentialStorage_()?,
- void connection_willSendRequestForAuthenticationChallenge_()?,
- bool connection_canAuthenticateAgainstProtectionSpace_()?,
- void connection_didReceiveAuthenticationChallenge_()?,
- void connection_didCancelAuthenticationChallenge_()?,
- bool $keepIsolateAlive = true,
Adds the implementation of the NSURLConnectionDelegate 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, {
void Function(NSURLConnection, objc.NSError)? connection_didFailWithError_,
bool Function(NSURLConnection)? connectionShouldUseCredentialStorage_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_willSendRequestForAuthenticationChallenge_,
bool Function(NSURLConnection, NSURLProtectionSpace)?
connection_canAuthenticateAgainstProtectionSpace_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_didReceiveAuthenticationChallenge_,
void Function(NSURLConnection, NSURLAuthenticationChallenge)?
connection_didCancelAuthenticationChallenge_,
bool $keepIsolateAlive = true,
}) {
NSURLConnectionDelegate.connection_didFailWithError_.implementAsBlocking(
builder,
connection_didFailWithError_,
);
NSURLConnectionDelegate.connectionShouldUseCredentialStorage_.implement(
builder,
connectionShouldUseCredentialStorage_,
);
NSURLConnectionDelegate
.connection_willSendRequestForAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_willSendRequestForAuthenticationChallenge_,
);
NSURLConnectionDelegate.connection_canAuthenticateAgainstProtectionSpace_
.implement(builder, connection_canAuthenticateAgainstProtectionSpace_);
NSURLConnectionDelegate.connection_didReceiveAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didReceiveAuthenticationChallenge_,
);
NSURLConnectionDelegate.connection_didCancelAuthenticationChallenge_
.implementAsBlocking(
builder,
connection_didCancelAuthenticationChallenge_,
);
builder.addProtocol($protocol);
}