DXCore Components – IssueProvider
The IssueProvider component represents a particular code issue check provider, which verifies the source code. This component is a part of the Code Issues Analysis Engine from the CodeRush. The newly created provider will be automatically registered once DXCore/CodeRush is loaded. You should be able to see it appear on the Editor | Code Analysis | Catalog options page in the Options Dialog.
You can drop the IssueProvider control onto your plug-in design surface from the “DXCore: Extensions & Providers” category of Visual Studio Toolbox:
Here’s the Properties window, containing available properties, their categories and default values:
and the Events list:
The IssueProvider component is located in the “DevExpress.CodeRush. Core” assembly. It is derived from the “CodeIssueProvider” base type from the same assembly. The base type is actually an old name of the component, later it was renamed into simple IssueProvider. The original base type is the ProviderBase type, which is a base type for all provider components (CodeProvider, NavigationProvider, CodeMetricProvider, StringProvider, etc):
Here’s a list of properties in alphabetical order:
Property name |
Description |
DefaultIssueType | The default type of this code issue (Error, Warning, Dead Code, Hint or Code Smell) |
Descriprion | Text describing the purpose or behavior of this plug-in extension. This text may appear inside the User Guide, configuration UI, or the About box. |
DisplayName | A text name that identifies this extension. This text may appear inside the User Guide, configuration UI, or the About box. |
ProviderName | Name of this provider. |
Register | If true, this extension will be available to the DXCore – otherwise, it’ll be hidden. |
Events:
Event name |
Description |
CheckCodeIssues | Handle this event to process a file and search for code issues. Use the Scope property of the passed-in event args (Scope usually points to an ISourceFile) to search that scope for issues. |
LanguageSupported | Handle this optional event if you want to restrict your code issue to one or more programming languages. If you do not handle this event, your code issue provider will be available in all programming languages. |
Here’s a list of methods for using of this control:
Name |
Description |
GetCodeIssues | Returns code issues enumerable for the given scope. |
IsLanguageSupported | Returns true if this code issue is available in the given language. |
See the “How to use IssueProvider DXCore component” topic, to learn more on how to use this control.
—– Products: DXCore Versions: 10.1 and up VS IDEs: any Updated: Feb/12/2010 ID: D040