AsyncServiceProvider AsyncServiceProvider AsyncServiceProvider AsyncServiceProvider Class

Definition

An asynchronous service provider.

public ref class AsyncServiceProvider sealed : IDisposable, Microsoft::VisualStudio::OLE::Interop::IObjectWithSite, Microsoft::VisualStudio::Shell::IAsyncServiceProvider, Microsoft::VisualStudio::Shell::IAsyncServiceProvider2
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AsyncServiceProvider : IDisposable, Microsoft.VisualStudio.OLE.Interop.IObjectWithSite, Microsoft.VisualStudio.Shell.IAsyncServiceProvider, Microsoft.VisualStudio.Shell.IAsyncServiceProvider2
type AsyncServiceProvider = class
    interface IAsyncServiceProvider2
    interface IAsyncServiceProvider
    interface IDisposable
    interface IObjectWithSite
Public NotInheritable Class AsyncServiceProvider
Implements IAsyncServiceProvider, IAsyncServiceProvider2, IDisposable, IObjectWithSite
Inheritance
AsyncServiceProviderAsyncServiceProviderAsyncServiceProviderAsyncServiceProvider
Attributes
Implements
IObjectWithSiteIObjectWithSiteIObjectWithSiteIObjectWithSite IAsyncServiceProviderIAsyncServiceProviderIAsyncServiceProviderIAsyncServiceProvider Microsoft.VisualStudio.Shell.IAsyncServiceProvider2Microsoft.VisualStudio.Shell.IAsyncServiceProvider2Microsoft.VisualStudio.Shell.IAsyncServiceProvider2Microsoft.VisualStudio.Shell.IAsyncServiceProvider2 IDisposableIDisposableIDisposableIDisposable

Constructors

AsyncServiceProvider(IAsyncServiceProvider) AsyncServiceProvider(IAsyncServiceProvider) AsyncServiceProvider(IAsyncServiceProvider) AsyncServiceProvider(IAsyncServiceProvider)

Creates a new AsyncServiceProvider chaining to the other ctor and providing 'true' for the 'defaultServices' parameter.

AsyncServiceProvider(IAsyncServiceProvider, Boolean) AsyncServiceProvider(IAsyncServiceProvider, Boolean) AsyncServiceProvider(IAsyncServiceProvider, Boolean) AsyncServiceProvider(IAsyncServiceProvider, Boolean)

Creates a new AsyncServiceProvider object and uses the given interface to resolve services. If defaultServices is true (the default used by the ctor that doesn't take a 'defaultServices' parameter) this service provider will respond to IObjectWithSite as a service. A query for IObjectWithSite will return this object.
If false is passed in for defaultServices this service will not be provided and the service provider will be "transparent".

Properties

GlobalProvider GlobalProvider GlobalProvider GlobalProvider

Gets the global provider.

Methods

CreateFromSetSite(IAsyncServiceProvider) CreateFromSetSite(IAsyncServiceProvider) CreateFromSetSite(IAsyncServiceProvider) CreateFromSetSite(IAsyncServiceProvider)

Create a new AsyncServiceProvider for the given site. Should be called from an object that implements SetSite (IObjectWithSite or IVsPackage). Automatically sets the global async service provider if it hasn't already been set. This method is typically called from the SetSite method of a Visual Studio package. Note: By calling this method, the caller declares that it knows the global async service provider and that the AsyncServiceProvider instance returned may be used by other, unrelated components, accessed via the AsyncServiceProvider.GlobalProvider static property.

Dispose() Dispose() Dispose() Dispose()

Disposes the object.

GetServiceAsync(Type) GetServiceAsync(Type) GetServiceAsync(Type) GetServiceAsync(Type)
GetServiceAsync(Type, Boolean) GetServiceAsync(Type, Boolean) GetServiceAsync(Type, Boolean) GetServiceAsync(Type, Boolean)
QueryServiceAsync(Guid) QueryServiceAsync(Guid) QueryServiceAsync(Guid) QueryServiceAsync(Guid)
QueryServiceAsync(Type) QueryServiceAsync(Type) QueryServiceAsync(Type) QueryServiceAsync(Type)

Explicit Interface Implementations

IObjectWithSite.GetSite(Guid, IntPtr) IObjectWithSite.GetSite(Guid, IntPtr) IObjectWithSite.GetSite(Guid, IntPtr) IObjectWithSite.GetSite(Guid, IntPtr)

Gets the service provider.

IObjectWithSite.SetSite(Object) IObjectWithSite.SetSite(Object) IObjectWithSite.SetSite(Object) IObjectWithSite.SetSite(Object)

Sets the service provider.

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to