viewProtocol<T> method
ViewProtocol views the resource management scope for a specific protocol.
Implementation
@override
Future<T> viewProtocol<T>(ProtocolID protocol, Future<T> Function(ProtocolScope scope) f) async {
final scope = getProtocolScopeInternal(protocol);
scope.incRef();
try {
return await f(scope);
} finally {
scope.decRef();
}
}