File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-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
You can’t perform that action at this time.
0 commit comments