ExportCodeFixProviderAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用這個屬性來宣告 CodeFixProvider 實作,讓主機可以探索它。
public ref class ExportCodeFixProviderAttribute sealed : System::Composition::ExportAttribute
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Composition.MetadataAttribute]
public sealed class ExportCodeFixProviderAttribute : System.Composition.ExportAttribute
[System.Composition.MetadataAttribute]
[System.AttributeUsage(System.AttributeTargets.Class, Inherited=false)]
public sealed class ExportCodeFixProviderAttribute : System.Composition.ExportAttribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Composition.MetadataAttribute>]
type ExportCodeFixProviderAttribute = class
inherit ExportAttribute
[<System.Composition.MetadataAttribute>]
[<System.AttributeUsage(System.AttributeTargets.Class, Inherited=false)>]
type ExportCodeFixProviderAttribute = class
inherit ExportAttribute
Public NotInheritable Class ExportCodeFixProviderAttribute
Inherits ExportAttribute
- 繼承
-
ExportCodeFixProviderAttribute
- 屬性
建構函式
ExportCodeFixProviderAttribute(String, String[]) |
用來指定自動應用程式程式碼修正提供者的屬性建構函式。 |
屬性
DocumentExtensions |
此提供者可以提供程式碼修正的檔延伸模組。 每個擴充字串都必須包含前置句號,例如 「.txt」、「.xaml」、「.editorconfig」 等。根據預設,此值為 Null,而且不會考慮檔延伸模組來判斷程式碼修正的適用性。 |
DocumentKinds |
此提供者可以提供程式碼修正的檔種類。 請參閱 TextDocumentKind。 根據預設,提供者僅支援來源文件的程式碼修正。 Document 提供此屬性檔案類型的字串表示,例如:DocumentKinds = new[] { nameof (TextDocumentKind.AdditionalDocument) } |
Languages |
此提供者可以提供修正程式的來來源語言。 請參閱 LanguageNames。 |
Name |
的 CodeFixProvider 選擇性名稱。 |