GenericSymbolWithSyntaxTree.GetBranches - monkey0506/Monkeymoto.GeneratorUtils.GenericSymbolReferenceTree GitHub Wiki
Returns a collection of all branches in the tree that match the given symbol.
public IEnumerable<GenericSymbolWithSyntax> GetBranchesBySymbol(ISymbol symbol, CancellationToken cancellationToken)
If symbol
is an open generic symbol, this method will discover all branches that match symbol
after type substitutions. For example, if symbol
is the original symbol definition, this method will discover all branches that share the same original symbol.
If symbol
is a closed generic symbol, then the returned collection will only represent those syntax nodes which reference this closed symbol.
symbol
ISymbol
The generic symbol to find in the tree.
cancellationToken
CancellationToken
The CancellationToken that will be observed while searching the tree.
IEnumerable<GenericSymbolWithSyntax>
A flattened collection of all branches in the tree that match symbol
, regardless of the syntax node. The returned collection will only contain closed generic symbols.