File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,8 @@ private static IEnumerable<SyntaxToken> GetModifiers<T>(this ISymbol symbol, Fun
7777 /// <summary>
7878 /// Gets the source-level modifiers belonging to this symbol, if any.
7979 /// </summary>
80- public static IEnumerable < string > GetSourceLevelModifiers ( this ISymbol symbol )
81- {
82- var methodModifiers = symbol . GetModifiers < Microsoft . CodeAnalysis . CSharp . Syntax . BaseMethodDeclarationSyntax > ( md => md . Modifiers ) ;
83- var typeModifiers = symbol . GetModifiers < Microsoft . CodeAnalysis . CSharp . Syntax . TypeDeclarationSyntax > ( cd => cd . Modifiers ) ;
84- return methodModifiers . Concat ( typeModifiers ) . Select ( m => m . Text ) ;
85- }
80+ public static IEnumerable < string > GetSourceLevelModifiers ( this ISymbol symbol ) =>
81+ symbol . GetModifiers < Microsoft . CodeAnalysis . CSharp . Syntax . MemberDeclarationSyntax > ( md => md . Modifiers ) . Select ( m => m . Text ) ;
8682
8783 /// <summary>
8884 /// Holds if the ID generated for `dependant` will contain a reference to
Original file line number Diff line number Diff line change 1+ ---
2+ category : minorAnalysis
3+ ---
4+ * The extraction of member modifiers has been generalised, which could lead to the extraction of more modifiers.
You can’t perform that action at this time.
0 commit comments