Share via


ExtensionPointAsyncPackage Class

Definition

public ref class ExtensionPointAsyncPackage abstract : Microsoft::VisualStudio::Shell::AsyncPackage, Microsoft::VisualStudio::Shell::Interop::IVsPackageExtensionProvider
[Windows::Foundation::Metadata::WebHostHidden]
public ref class ExtensionPointAsyncPackage abstract : Microsoft::VisualStudio::Shell::AsyncPackage, Microsoft::VisualStudio::Shell::Interop::IVsPackageExtensionProvider
[Windows::Foundation::Metadata::WebHostHidden]
class ExtensionPointAsyncPackage abstract : Microsoft::VisualStudio::Shell::AsyncPackage, Microsoft::VisualStudio::Shell::Interop::IVsPackageExtensionProvider
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class ExtensionPointAsyncPackage : Microsoft.VisualStudio.Shell.AsyncPackage, Microsoft.VisualStudio.Shell.Interop.IVsPackageExtensionProvider
[<System.Runtime.InteropServices.ComVisible(true)>]
type ExtensionPointAsyncPackage = class
    inherit AsyncPackage
    interface IVsPackageExtensionProvider
Public MustInherit Class ExtensionPointAsyncPackage
Inherits AsyncPackage
Implements IVsPackageExtensionProvider
Inheritance
ExtensionPointAsyncPackage
Attributes
Implements

Remarks

This class is mostly identical to ExtensionPointPackage but derives from AsyncPackage to support AsyncPackages

Constructors

ExtensionPointAsyncPackage()

Properties

ApplicationRegistryRoot

Gets the root registry key of the current Visual Studio registry hive.

(Inherited from Package)
DisposalToken

Exposes a CancellationToken that can be used to check if the package has been disposed. This can happen for async tasks that are running on a background thread when Visual Studio has started to shut down. Use ShutdownToken for an earlier indication that VS is shutting down.

(Inherited from AsyncPackage)
JoinableTaskCollection

Gets the collection of asynchronous tasks started by this package.

(Inherited from AsyncPackage)
JoinableTaskFactory

Gets the factory to use for asynchronous tasks started by this package.

(Inherited from AsyncPackage)
UserDataPath

Gets the path to user data storage for Visual Studio.

(Inherited from Package)
UserLocalDataPath

Returns the path to user data storage for Visual Studio. Typically this is %USERPROFILE%\Local Settings\Application Data
Visual Studio[ver] but this can change based on any alternate root that the shell was initialized with.

(Inherited from Package)
UserRegistryRoot

Returns the registry root for the current user. Typically this is HKCU\Software\Microsoft\VisualStudio[ver] but this can change based on any alternate root that the shell is initialized with. This key is read-write.

(Inherited from Package)
Zombied

Gets a value indicating whether the package in the process of shutdown.

(Inherited from Package)

Methods

AddOptionKey(String)

Adds a user option key name into the list of option keys.

(Inherited from Package)
AddService(Type, AsyncServiceCreatorCallback, Boolean)

Adds an async service to this package, specifying whether the service will be visible outside of this package.

(Inherited from AsyncPackage)
AddService(Type, AsyncServiceCreatorCallback)

Adds an async service to this package. The service will not be visible outside of this package.

(Inherited from AsyncPackage)
AddService(Type, AsyncServiceCreatorWithProgressCallback, Boolean)

Adds an async service to this package that supports progress updates during initialization. This service may or may not be visible outside of this package, depending on the value of promote.

(Inherited from AsyncPackage)
AddService(Type, AsyncServiceCreatorWithProgressCallback)

Adds an async service that supports progress updates during initialization to this package. The service will not be visible outside of this package.

(Inherited from AsyncPackage)
CreateCodeContainerProvider(Guid)

Creates a code container provider for the given registered provider Guid.This is called by the base class in response to a request for the ICodeContainer extension point. The base implementation searches for ProvideCodeContainerProviderAttribute attributes on the package class and instantiates the appropriate provider. May be overridden.

CreateDiagnosticsProvider(Guid)

Creates the diagnostics provider for the given registered provider GUID. This is called by the base class in response to a request for the ExtId_VsComponentDiagnostics extension point. The base implementation searches for ProvideComponentDiagnostics attributes on the package class and instantiates the appropriate provider. May be overridden.

CreateExtensionPoint(Guid, Guid)

Called by the base class in order to satisfy a request for an extension point. Extension points are implemented by packages and requested on demand by shared components. This is the reverse of the 'factory' pattern where packages register factories with a central service. The base class implements discovery mechanisms for well-known extension points. Derived classes may override this and optionally call the base class.

CreateExtensionPointProvider<TAttribute,TInterface>(Guid)

Create the extension provider declared with the attribute TAttribute on the package, implementing an extension point of type TInterface

CreateInstance(Guid, Guid, Type)

Create the specified COM object using Visual Studio's ILocalRegistry and cast it to the given managed type. If VS cannot create it, then fall back to Activator.CreateInstance. This allows managed classes to be registered in local to the particular VS version in HKLM\Software\Microsoft\VisualStudio\8.0\clsid.

(Inherited from Package)
CreateSearchProvider(Guid)

Creates the global search provider for the given registered provider GUID. This is called by the base class in response to a request for the IVsSearchProvider extension point. The base implementation searches for ProvideSearchProvider attributes on the package class and instantiates the appropriate provider. May be overridden.

CreateSettingsObserverAsync(Type, SettingsObserverArguments, CancellationToken)

Creates a settings observer object for the package. This method is called when unified settings are active, but only if the package has one or more ProvideSettingsObserverAttributes.

(Inherited from Package)
CreateTool(Guid)

Enables derived classes to provide an implementation if necessary.

(Inherited from Package)
CreateToolWindow(Guid, Int32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Type, Int32, Object)

Create a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Type, Int32, UInt32, Object, Guid)

Create a tool window of the specified type with the specified ID. This is the only method that should be calling IVsUiShell.CreateToolWindow()

(Inherited from Package)
CreateToolWindow(Type, Int32, UInt32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Type, Int32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
Dispose(Boolean)

Disposes the object and the associated cancellation token.

(Inherited from AsyncPackage)
FindToolWindow(Type, Int32, Boolean)

Gets the tool window corresponding to the specified type and ID.

(Inherited from Package)
FindToolWindowAsync(Type, Int32, Boolean, CancellationToken)

Asynchronously locates the tool window corresponding to the specified type and ID. If it does not exist, it creates and returns one if create is true, or returns null if create is false.

(Inherited from AsyncPackage)
FindWindowPane(Type, Int32, Boolean)

Gets the window pane corresponding to the specified type and ID, and if no window pane of that type exists creates one if told to do so.

(Inherited from Package)
FindWindowPaneAsync(Type, Int32, Boolean, CancellationToken)

Asynchronously locates the window pane corresponding to the specified type and ID. If it does not exist, it creates and returns one if create is true, or returns null if create is false.

(Inherited from AsyncPackage)
GetAsyncToolWindowFactory(Guid)

Returns the asynchronous tool window factory interface for the tool window identified by toolWindowType, if asynchronous creation is supported for the tool window. If asynchronous creation is not supported, null is returned.

(Inherited from AsyncPackage)
GetAutomationObject(String)

Gets the automation object for the VSPackage.

(Inherited from Package)
GetDialogPage(Type)

Gets the requested dialog page.

(Inherited from Package)
GetOutputPane(Guid, String)

Gets the requested output window.

(Inherited from Package)
GetProviderLocale()

Returns the locale of the environment.

(Inherited from Package)
GetService(Type)

Retrieves a service registered with this package synchronously, falling back to the asynchronous GlobalProvider and synchronous GlobalProvider if there is no service with this identity registered with the package.

(Inherited from AsyncPackage)
GetServiceAsync(Type, Boolean)

Retrieves an async service registered with this package asynchronously, falling back to the asynchronous GlobalProvider and synchronous GlobalProvider if there is no service with this identity registered with the package. It also allows specifying a hint whether to throw an exception if it could not be retrieved, it does not, however, guarantee exceptions will be thrown for all failure cases.

(Inherited from AsyncPackage)
GetServiceAsync(Type)

Retrieves an async service registered with this package asynchronously, falling back to the asynchronous GlobalProvider and synchronous GlobalProvider if there is no service with this identity registered with the package.

(Inherited from AsyncPackage)
GetServiceAsync<TService,TInterface>(Boolean, CancellationToken)

Retrieves an async service registered with this package asynchronously, falling back to the asynchronous GlobalProvider and synchronous GlobalProvider if there is no service with this identity registered with the package. It also allows specifying whether to throw an exception if it could not be retrieved.

(Inherited from AsyncPackage)
GetToolboxItemData(String, DataFormats+Format)

Gets the content of the data format for the specified toolbox item ID and data format.

(Inherited from Package)
GetToolboxItemDataAsync(String, DataFormats+Format) (Inherited from Package)
GetToolWindowTitle(Type, Int32)

Returns the title string to use for the tool window. If null is returned, the tool window's type name is used for the title.

(Inherited from AsyncPackage)
Initialize()

Seal this method. Due to an almost unavoidable risk of deadlock, SetSite (which is what calls Initialize) still occurs on the UI thread even for async package. Since most async package authors would, logically, assume that Initialize happens on a b/g thread they may do expensive (synchronous) things inside of their override, defeating some of the benefit of async loads. To help lead them away from that we will seal it and thus all they can override is async initialize, which is called on the b/g thread.

(Inherited from AsyncPackage)
InitializeAsync(CancellationToken, IProgress<ServiceProgressData>)

When overridden in a derived class, asynchronously initializes the package. This method is invoked from a background thread.

(Inherited from AsyncPackage)
InitializeToolWindowAsync(Type, Int32, CancellationToken)

Performs initialization in preparation for creating the tool window identified by toolWindowType.

(Inherited from AsyncPackage)
InstantiateToolWindow(Type, Object)

Construct a tool window of the specified type.

(Inherited from Package)
InstantiateToolWindow(Type) (Inherited from Package)
IsLocalService(Type)

Determines whether the specified service type can be retrieved without requiring an RPC transition to the UI thread.

(Inherited from Package)
OnAfterPackageLoadedAsync(CancellationToken)

When overridden by a derived class, may initiate operations with side effects that are not strictly part of package load that would belong to InitializeAsync(CancellationToken, IProgress<ServiceProgressData>) that should happen soon after package load (e.g. updating command status). This method is invoked from a background thread.

(Inherited from AsyncPackage)
OnLoadOptions(String, Stream)

Invoked by the package class when there are options to be read out of the solution file.

(Inherited from Package)
OnSaveOptions(String, Stream)

Invoked by the Package class when there are options to be saved to the solution file.

(Inherited from Package)
ParseToolboxResource(TextReader, Guid)

Parses an embedded text resource of appropriate format for information about which items should be added to the Toolbox.

(Inherited from Package)
ParseToolboxResource(TextReader, ResourceManager)

Parses an embedded text resource of appropriate format for information about which items should be added to the Toolbox.

(Inherited from Package)
QueryClose(Boolean)

Called to ask the package if the shell can be closed.

(Inherited from Package)
RegisterEditorFactory(IVsEditorFactory)

Registers an editor factory with Visual Studio.

(Inherited from Package)
RegisterProjectFactory(IVsProjectFactory)

Registers a project factory with Visual Studio.

(Inherited from Package)
RemoveService(Type, Boolean)

Removes an async service registered with this package.

(Inherited from AsyncPackage)
RemoveService(Type)

Removes an async service registered with this package.

(Inherited from AsyncPackage)
ShowOptionPage(Type)

Displays a specified tools options page.

(Inherited from Package)
ShowToolWindowAsync(Type, Int32, Boolean, CancellationToken)

Asynchronously shows the tool window corresponding to the specified type and ID. If it does not exist, it creates and returns one if create is true, or returns null if create is false.

(Inherited from AsyncPackage)

Events

ToolboxInitialized

Event generated whenever Visual Studio initializes its Toolbox.

(Inherited from Package)
ToolboxUpgraded

Event generated whenever Visual Studio upgrades its Toolbox.

(Inherited from Package)

Explicit Interface Implementations

IAsyncLoadablePackageInitialize.Initialize(IAsyncServiceProvider, IProfferAsyncService, IAsyncProgressCallback)

Async version of SetSite, mostly called from a background thread, but not always.

(Inherited from AsyncPackage)
IAsyncLoadablePackageInitialize.Initialize(IAsyncServiceProvider, IProfferAsyncService, IAsyncProgressCallback)

Async version of SetSite, called from a b/g thread.

(Inherited from AsyncPackage)
IAsyncServiceProvider.QueryServiceAsync(Guid)

Get an async initializing service that is offered by this package.

(Inherited from AsyncPackage)
IAsyncServiceProvider.QueryServiceAsync(Guid)

Get an async initializing service that is offered by this package.

(Inherited from AsyncPackage)
IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr)

Executes a specified command or displays help for a command.

(Inherited from Package)
IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr)

Queries the object for the status of one or more commands generated by user interface events.

(Inherited from Package)
IServiceContainer.AddService(Type, Object, Boolean)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.AddService(Type, Object)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

Adds the given service to the service container by means of the specified ServiceCreatorCallback.

(Inherited from Package)
IServiceContainer.AddService(Type, ServiceCreatorCallback)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.RemoveService(Type, Boolean)

Removes the given service type from the service container, and optionally promotes the removal of the service to parent service containers.

(Inherited from Package)
IServiceContainer.RemoveService(Type)

Removes the given service type from the service container.

(Inherited from Package)
IServiceProvider.GetService(Type)

Gets the service of the specified type.

(Inherited from Package)
IServiceProvider.QueryService(Guid, Guid, IntPtr)

Internal IServiceProvider implementation.

(Inherited from Package)
IVsAsyncToolWindowFactory.CreateToolWindow(Guid, UInt32, Object)

Creates a tool window of the specified type with the specified ID.

(Inherited from AsyncPackage)
IVsAsyncToolWindowFactory.GetToolWindowTitle(Guid, UInt32)

Returns the title string to use for the tool window. If null is returned, the tool window's type name is used for the title.

(Inherited from AsyncPackage)
IVsAsyncToolWindowFactory.InitializeToolWindowAsync(Guid, UInt32)

Performs initialization in preparation for creating the tool window identified by toolWindowType.

(Inherited from AsyncPackage)
IVsAsyncUnifiedSettingsObserverFactory.CreateSettingsObserverAsync(Guid)

Instantiates Unified Settings observer identified by the given guid.

(Inherited from Package)
IVsPackage.Close()

Closes and disposes the package.

(Inherited from Package)
IVsPackage.GetAutomationObject(String, Object)

Gets an automation-friendly object for this package.

(Inherited from Package)
IVsPackage.GetPropertyPage(Guid, VSPROPSHEETPAGE[])

Proffers access to the Tools menu Options and the property pages of the Customize Toolbox dialog boxes.

(Inherited from Package)
IVsPackage.QueryClose(Int32)

Called to ask the VSPackage if the Visual Studio shell can be closed.

(Inherited from Package)
IVsPackage.ResetDefaults(UInt32)

Resets Toolbox defaults.

(Inherited from Package)
IVsPackage.SetSite(IServiceProvider)

Initializes the VSPackage in the Visual Studio environment.

(Inherited from Package)
IVsPackageExtensionProvider.CreateExtensionInstance(Guid, Guid)

Implements the generic extension point discovery mechanism.

IVsPersistSolutionOpts.LoadUserOptions(IVsSolutionPersistence, UInt32)

Loads user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.ReadUserOptions(IStream, String)

Reads user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.SaveUserOptions(IVsSolutionPersistence)

Saves user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.WriteUserOptions(IStream, String)

Writes user options for a given solution.

(Inherited from Package)
IVsToolboxItemProvider.GetItemContent(String, UInt16, IntPtr)

Gets an item.

(Inherited from Package)
IVsToolboxItemProvider2.GetItemContentAsync(String, UInt16) (Inherited from Package)
IVsToolWindowFactory.CreateToolWindow(Guid, UInt32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
IVsUserSettings.ExportSettings(String, IVsSettingsWriter)

This method implements the IVsUserSettings Interface used to manage profiles and import/export settings to XML files.

(Inherited from Package)
IVsUserSettings.ImportSettings(String, IVsSettingsReader, UInt32, Int32)

Retrieves a VSPackage's configuration using the Visual Studio settings mechanism when a user selects the import option of the Import/Export Settings feature on the IDE’s Tools menu. This method is part of the implementation of the IVsUserSettings interface used to manage profiles and import/export settings to XML files.

(Inherited from Package)
IVsUserSettingsMigration.MigrateSettings(IVsSettingsReader, IVsSettingsWriter, String)

Migrates settings from a previous version.

(Inherited from Package)
IVsUserSettingsQuery.NeedExport(String, Int32)

Determines whether settings have changed and should be re-exported.

(Inherited from Package)

Extension Methods

ProfferService<TService>(IAsyncServiceContainer, Func<CancellationToken,Task<Object>>, Boolean)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called.

ProfferService<TService>(IAsyncServiceContainer, Func<CancellationToken,Task<Object>>)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called. The proffered service will be promoted to the parent async service container.

ProfferService<TService>(IAsyncServiceContainer, Func<Task<Object>>, Boolean)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called.

ProfferService<TService>(IAsyncServiceContainer, Func<Task<Object>>)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called. The proffered service will be promoted to the parent async service container.

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

GetServiceAsync<TService,TInterface>(IAsyncServiceProvider, Boolean, CancellationToken)

Retrieves a proffered service asynchronously, specifying whether to throw an exception if it could not be retrieved.

GetServiceAsync<TService,TInterface>(IAsyncServiceProvider, Boolean)

Retrieves a proffered service asynchronously, specifying whether to throw an exception if it could not be retrieved.

GetServiceAsync<TService,TInterface>(IAsyncServiceProvider, CancellationToken)

Retrieves a proffered service asynchronously, throwing an exception if it could not be retrieved.

GetServiceAsync<TService,TInterface>(IAsyncServiceProvider)

Retrieves a proffered service asynchronously, throwing an exception if it could not be retrieved.

Applies to