File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers/OrderingRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,19 +57,14 @@ private static void HandleTypeDeclaration(SyntaxNodeAnalysisContext context)
5757 {
5858 var typeDeclarationNode = ( TypeDeclarationSyntax ) context . Node ;
5959
60- if ( ContainsModifier ( typeDeclarationNode . Modifiers , SyntaxKind . PartialKeyword ) )
60+ if ( typeDeclarationNode . Modifiers . Any ( SyntaxKind . PartialKeyword ) )
6161 {
62- if ( ! ContainsModifier ( typeDeclarationNode . Modifiers , SyntaxKind . PublicKeyword ) &&
63- ! ContainsModifier ( typeDeclarationNode . Modifiers , SyntaxKind . InternalKeyword ) )
62+ if ( ! typeDeclarationNode . Modifiers . Any ( SyntaxKind . PublicKeyword )
63+ && ! typeDeclarationNode . Modifiers . Any ( SyntaxKind . InternalKeyword ) )
6464 {
6565 context . ReportDiagnostic ( Diagnostic . Create ( Descriptor , typeDeclarationNode . Identifier . GetLocation ( ) ) ) ;
6666 }
6767 }
6868 }
69-
70- private static bool ContainsModifier ( SyntaxTokenList modifiers , SyntaxKind expectedKeyword )
71- {
72- return modifiers . Any ( modifier => modifier . Kind ( ) == expectedKeyword ) ;
73- }
7469 }
7570}
You can’t perform that action at this time.
0 commit comments