DXCore Services – Content
November 22nd, 2011
The Content DXCore service provides methods for accessing content providers. Content providers are a common object for refactoring operations and code providers which modify source code.
Methods of this service:
Method name |
Description |
BeginUpdate | Suspends an availability check for content providers (refactoring or code operations). If you call this inside a plug-in, you must guarantee a call to EndUpdate (e.g., placed in a finally block). |
EndUpdate | Marks the end of an update session. You must call this once for every call to BeginUpdate. |
Execute(String) | Executes a content provider with the specified provider name. |
Get(String) | Returns a content provider with the specified provider name. |
GetAvailableContentProvidersAfterParse | Parses the active text document if its text has been changed. Then, returns all available content providers in the current context. |
GetFixesForIssue(String) | Returns the list of all content providers that can fix the specified CodeRush code issue. |
IsAvailable(ContentProvider, IElement) | Returns true if the given code provider is available in the specified context. |
IsAvailable(String, IElement) | Returns true if the given code provider is available in the specified context. |
IsAvailable(String, IElement, Boolean) | Returns true if the given code provider is available in the specified context. |
IsAvailable(String, ScopeResolveResult, IElement, Boolean) | Returns true if the given code provider is available in the specified context. |
RegisterExtension(String) | Registers a new content provider extension. |
ResetIsUpdating | Resets the internal update counter, so the availability checks can be resumed. |
Properties:
Property name |
Description |
AvailableProviders | Gets all available content providers in the current context. |
CanShowSmartTag | Returns true if there’s at least one content provider available and it’s possible to show the Smart Tag. |
IsUpdating | Returns true if an availability check is being updated. |
LastExecutedProvider | Returns the last applied content provider. |
Providers | Gets all registered content providers. |
VSFeatures | Returns the list of Visual Studio built-in refactorings wrappers. |