find<T> method
Finds all matching dependencies by their name.
name
the dependency name to locate.required
true to raise an exception when no dependencies are found. Returns a list of found dependencies
Throws a ReferenceException of required is true and no dependencies found.
Implementation
List<T> find<T>(String name, bool required) {
var locator = locate(name);
if (locator == null) {
if (required) throw ReferenceException(null, name);
return [];
}
return _references!.find<T>(locator, required);
}