Пример #1
0
 private static void AppendItem(this HierarchicalStringBuilder builder, DependenciesAnalysis.Reference reference)
 {
     builder.AppendItem("{0} ({1})", reference.Syntax, reference.Symbol?.Kind);
     //if (reference.TypeSymbols.Any()) {
     //    builder.AppendItem( "{0} ({1}): {2}", reference.Syntax, reference.Symbol?.Kind, reference.TypeSymbols.Join() );
     //} else {
     //    builder.AppendItem( "{0} ({1})", reference.Syntax, reference.Symbol?.Kind );
     //}
 }
Пример #2
0
 // Helpers/DependenciesAnalysis
 private static SyntaxNode?GetScope(this DependenciesAnalysis.Reference reference)
 {
     return(reference.Syntax.Ancestors().FirstOrDefault(i => IsScope(i)));
 }