@@ -16,13 +16,6 @@ internal class ViewComponentTypeVisitor : SymbolVisitor
16
16
private readonly INamedTypeSymbol _nonViewComponentAttribute ;
17
17
private readonly List < INamedTypeSymbol > _results ;
18
18
19
- public static ViewComponentTypeVisitor Create ( Compilation compilation , List < INamedTypeSymbol > results )
20
- {
21
- var vcAttribute = compilation . GetTypeByMetadataName ( ViewComponentTypes . ViewComponentAttribute ) ;
22
- var nonVCAttribute = compilation . GetTypeByMetadataName ( ViewComponentTypes . NonViewComponentAttribute ) ;
23
- return new ViewComponentTypeVisitor ( vcAttribute , nonVCAttribute , results ) ;
24
- }
25
-
26
19
public ViewComponentTypeVisitor (
27
20
INamedTypeSymbol viewComponentAttribute ,
28
21
INamedTypeSymbol nonViewComponentAttribute ,
@@ -31,12 +24,8 @@ public ViewComponentTypeVisitor(
31
24
_viewComponentAttribute = viewComponentAttribute ;
32
25
_nonViewComponentAttribute = nonViewComponentAttribute ;
33
26
_results = results ;
34
-
35
- Enabled = _viewComponentAttribute != null ;
36
27
}
37
28
38
- public bool Enabled { get ; set ; }
39
-
40
29
public override void VisitNamedType ( INamedTypeSymbol symbol )
41
30
{
42
31
if ( IsViewComponent ( symbol ) )
@@ -65,11 +54,6 @@ public override void VisitNamespace(INamespaceSymbol symbol)
65
54
66
55
internal bool IsViewComponent ( INamedTypeSymbol symbol )
67
56
{
68
- if ( ! Enabled )
69
- {
70
- return false ;
71
- }
72
-
73
57
if ( symbol . DeclaredAccessibility != Accessibility . Public ||
74
58
symbol . IsAbstract ||
75
59
symbol . IsGenericType ||
0 commit comments