allows method
Whether this filter opted into the given notification method. For
notifications/resources/updated, uri must be in resourceSubscriptions.
Implementation
bool allows(String method, {String? uri}) {
switch (method) {
case 'notifications/tools/list_changed':
return toolsListChanged;
case 'notifications/prompts/list_changed':
return promptsListChanged;
case 'notifications/resources/list_changed':
return resourcesListChanged;
case 'notifications/resources/updated':
return uri != null && resourceSubscriptions.contains(uri);
default:
return false;
}
}