44namespace StyleCop . Analyzers . DocumentationRules
55{
66 using System ;
7- using System . Collections . Immutable ;
87 using System . Linq ;
98 using System . Xml . Linq ;
109 using Microsoft . CodeAnalysis ;
1110 using Microsoft . CodeAnalysis . CSharp ;
1211 using Microsoft . CodeAnalysis . CSharp . Syntax ;
1312 using Microsoft . CodeAnalysis . Diagnostics ;
1413 using StyleCop . Analyzers . Helpers ;
14+ using StyleCop . Analyzers . Settings . ObjectModel ;
1515
1616 /// <summary>
1717 /// This is the base class for analyzers which examine the <c><summary></c> text of a documentation comment.
1818 /// </summary>
1919 internal abstract class ElementDocumentationSummaryBase : DiagnosticAnalyzer
2020 {
2121 private readonly Action < CompilationStartAnalysisContext > compilationStartAction ;
22- private readonly Action < SyntaxNodeAnalysisContext > typeDeclarationAction ;
23- private readonly Action < SyntaxNodeAnalysisContext > methodDeclarationAction ;
24- private readonly Action < SyntaxNodeAnalysisContext > constructorDeclarationAction ;
25- private readonly Action < SyntaxNodeAnalysisContext > destructorDeclarationAction ;
26- private readonly Action < SyntaxNodeAnalysisContext > propertyDeclarationAction ;
27- private readonly Action < SyntaxNodeAnalysisContext > indexerDeclarationAction ;
28- private readonly Action < SyntaxNodeAnalysisContext > fieldDeclarationAction ;
29- private readonly Action < SyntaxNodeAnalysisContext > delegateDeclarationAction ;
30- private readonly Action < SyntaxNodeAnalysisContext > eventDeclarationAction ;
22+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > typeDeclarationAction ;
23+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > methodDeclarationAction ;
24+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > constructorDeclarationAction ;
25+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > destructorDeclarationAction ;
26+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > propertyDeclarationAction ;
27+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > indexerDeclarationAction ;
28+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > fieldDeclarationAction ;
29+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > delegateDeclarationAction ;
30+ private readonly Action < SyntaxNodeAnalysisContext , StyleCopSettings > eventDeclarationAction ;
3131
3232 protected ElementDocumentationSummaryBase ( )
3333 {
@@ -73,7 +73,7 @@ public override void Initialize(AnalysisContext context)
7373 /// <param name="diagnosticLocations">The location(s) where diagnostics, if any, should be reported.</param>
7474 protected abstract void HandleXmlElement ( SyntaxNodeAnalysisContext context , DocumentationCommentTriviaSyntax documentation , XmlNodeSyntax syntax , XElement completeDocumentation , params Location [ ] diagnosticLocations ) ;
7575
76- private void HandleTypeDeclaration ( SyntaxNodeAnalysisContext context )
76+ private void HandleTypeDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
7777 {
7878 var node = ( BaseTypeDeclarationSyntax ) context . Node ;
7979 if ( node . Identifier . IsMissing )
@@ -90,7 +90,7 @@ private void HandleTypeDeclaration(SyntaxNodeAnalysisContext context)
9090 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
9191 }
9292
93- private void HandleDelegateDeclaration ( SyntaxNodeAnalysisContext context )
93+ private void HandleDelegateDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
9494 {
9595 var node = ( DelegateDeclarationSyntax ) context . Node ;
9696 if ( node . Identifier . IsMissing )
@@ -101,7 +101,7 @@ private void HandleDelegateDeclaration(SyntaxNodeAnalysisContext context)
101101 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
102102 }
103103
104- private void HandleMethodDeclaration ( SyntaxNodeAnalysisContext context )
104+ private void HandleMethodDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
105105 {
106106 var node = ( MethodDeclarationSyntax ) context . Node ;
107107 if ( node . Identifier . IsMissing )
@@ -118,7 +118,7 @@ private void HandleMethodDeclaration(SyntaxNodeAnalysisContext context)
118118 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
119119 }
120120
121- private void HandleConstructorDeclaration ( SyntaxNodeAnalysisContext context )
121+ private void HandleConstructorDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
122122 {
123123 var node = ( ConstructorDeclarationSyntax ) context . Node ;
124124 if ( node . Identifier . IsMissing )
@@ -129,7 +129,7 @@ private void HandleConstructorDeclaration(SyntaxNodeAnalysisContext context)
129129 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
130130 }
131131
132- private void HandleDestructorDeclaration ( SyntaxNodeAnalysisContext context )
132+ private void HandleDestructorDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
133133 {
134134 var node = ( DestructorDeclarationSyntax ) context . Node ;
135135 if ( node . Identifier . IsMissing )
@@ -140,7 +140,7 @@ private void HandleDestructorDeclaration(SyntaxNodeAnalysisContext context)
140140 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
141141 }
142142
143- private void HandlePropertyDeclaration ( SyntaxNodeAnalysisContext context )
143+ private void HandlePropertyDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
144144 {
145145 var node = ( PropertyDeclarationSyntax ) context . Node ;
146146 if ( node . Identifier . IsMissing )
@@ -151,7 +151,7 @@ private void HandlePropertyDeclaration(SyntaxNodeAnalysisContext context)
151151 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
152152 }
153153
154- private void HandleIndexerDeclaration ( SyntaxNodeAnalysisContext context )
154+ private void HandleIndexerDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
155155 {
156156 var node = ( IndexerDeclarationSyntax ) context . Node ;
157157 if ( node . ThisKeyword . IsMissing )
@@ -162,7 +162,7 @@ private void HandleIndexerDeclaration(SyntaxNodeAnalysisContext context)
162162 this . HandleDeclaration ( context , node , node . ThisKeyword . GetLocation ( ) ) ;
163163 }
164164
165- private void HandleFieldDeclaration ( SyntaxNodeAnalysisContext context )
165+ private void HandleFieldDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
166166 {
167167 var node = ( BaseFieldDeclarationSyntax ) context . Node ;
168168 if ( node . Declaration == null )
@@ -191,7 +191,7 @@ private void HandleFieldDeclaration(SyntaxNodeAnalysisContext context)
191191 this . HandleDeclaration ( context , node , locations ) ;
192192 }
193193
194- private void HandleEventDeclaration ( SyntaxNodeAnalysisContext context )
194+ private void HandleEventDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings )
195195 {
196196 var node = ( EventDeclarationSyntax ) context . Node ;
197197 if ( node . Identifier . IsMissing )
@@ -202,7 +202,7 @@ private void HandleEventDeclaration(SyntaxNodeAnalysisContext context)
202202 this . HandleDeclaration ( context , node , node . Identifier . GetLocation ( ) ) ;
203203 }
204204
205- private void HandleDeclaration ( SyntaxNodeAnalysisContext context , SyntaxNode node , params Location [ ] locations )
205+ private void HandleDeclaration ( SyntaxNodeAnalysisContext context , StyleCopSettings settings , SyntaxNode node , params Location [ ] locations )
206206 {
207207 var documentation = node . GetDocumentationCommentTriviaSyntax ( ) ;
208208 if ( documentation == null )
0 commit comments