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);
// The cast is now valid as getProtocolScopeInternal returns ProtocolScopeImpl
return await f(scope);
}