@@ -21,31 +21,29 @@ protected InspectionResultBase(IInspection inspection, Declaration target)
2121 /// <summary>
2222 /// Creates a comment inspection result.
2323 /// </summary>
24- protected InspectionResultBase ( IInspection inspection , CommentNode comment )
25- : this ( inspection , comment . QualifiedSelection . QualifiedName , null , comment )
24+ protected InspectionResultBase ( IInspection inspection , QualifiedModuleName qualifiedName )
25+ : this ( inspection , qualifiedName , null )
2626 { }
2727
2828 /// <summary>
2929 /// Creates an inspection result.
3030 /// </summary>
31- protected InspectionResultBase ( IInspection inspection , QualifiedModuleName qualifiedName , ParserRuleContext context , CommentNode comment = null )
31+ protected InspectionResultBase ( IInspection inspection , QualifiedModuleName qualifiedName , ParserRuleContext context )
3232 {
3333 _inspection = inspection ;
3434 _qualifiedName = qualifiedName ;
3535 _context = context ;
36- _comment = comment ;
3736 }
3837
3938 /// <summary>
4039 /// Creates an inspection result.
4140 /// </summary>
42- protected InspectionResultBase ( IInspection inspection , QualifiedModuleName qualifiedName , ParserRuleContext context , Declaration declaration , CommentNode comment = null )
41+ protected InspectionResultBase ( IInspection inspection , QualifiedModuleName qualifiedName , ParserRuleContext context , Declaration declaration )
4342 {
4443 _inspection = inspection ;
4544 _qualifiedName = qualifiedName ;
4645 _context = context ;
4746 _target = declaration ;
48- _comment = comment ;
4947 }
5048
5149 private readonly IInspection _inspection ;
@@ -59,9 +57,6 @@ protected InspectionResultBase(IInspection inspection, QualifiedModuleName quali
5957 private readonly ParserRuleContext _context ;
6058 public ParserRuleContext Context { get { return _context ; } }
6159
62- private readonly CommentNode _comment ;
63- public CommentNode Comment { get { return _comment ; } }
64-
6560 private readonly Declaration _target ;
6661 public Declaration Target { get { return _target ; } }
6762
@@ -72,12 +67,8 @@ public virtual QualifiedSelection QualifiedSelection
7267 {
7368 get
7469 {
75- if ( _context == null && _comment == null )
76- {
77- return _target . QualifiedSelection ;
78- }
7970 return _context == null
80- ? _comment . QualifiedSelection
71+ ? _target . QualifiedSelection
8172 : new QualifiedSelection ( _qualifiedName , _context . GetSelection ( ) ) ;
8273 }
8374 }
0 commit comments