|
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports System.Composition
Imports Analyzer.Utilities
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.CodeRefactorings
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports Roslyn.Diagnostics.Analyzers
Namespace Roslyn.Diagnostics.VisualBasic.Analyzers
<ExportCodeRefactoringProvider(LanguageNames.VisualBasic, Name:=NameOf(VisualBasicApplyTraitToClass))>
<[Shared]>
Public NotInheritable Class VisualBasicApplyTraitToClass
Inherits AbstractApplyTraitToClass(Of AttributeSyntax)
<ImportingConstructor>
<Obsolete("This exported object must be obtained through the MEF export provider.", True)>
Public Sub New()
End Sub
Private Protected Overrides ReadOnly Property RefactoringHelpers As IRefactoringHelpers
Get
Return VisualBasicRefactoringHelpers.Instance
End Get
End Property
Protected Overrides Function GetTypeDeclarationForNode(reportedNode As SyntaxNode) As SyntaxNode
Return reportedNode.FirstAncestorOrSelf(Of TypeBlockSyntax)()
End Function
End Class
End Namespace
|