Partager via


PackageUtilities.ProfferService Method

Definition

Overloads

ProfferService<TService,TImpl>(IServiceContainer)

Proffers a service implemented by the specified type to a service container

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>>)

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<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<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,TImpl>(IServiceContainer)

Proffers a service implemented by the specified type to a service container

public:
generic <typename TService, typename TImpl>
 where TImpl : gcnew() static void ProfferService(System::ComponentModel::Design::IServiceContainer ^ serviceContainer);
public static void ProfferService<TService,TImpl> (System.ComponentModel.Design.IServiceContainer serviceContainer) where TImpl : new();
static member ProfferService : System.ComponentModel.Design.IServiceContainer -> unit (requires 'Impl : (new : unit -> 'Impl))
Public Sub ProfferService(Of TService, TImpl) (serviceContainer As IServiceContainer)

Type Parameters

TService

Service type

TImpl

Type implementing TService

Parameters

serviceContainer
IServiceContainer

Service container to proffer to

Applies to

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.

public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static void ProfferService(Microsoft::VisualStudio::Shell::IAsyncServiceContainer ^ serviceContainer, Func<System::Threading::CancellationToken, System::Threading::Tasks::Task<System::Object ^> ^> ^ creator);
public static void ProfferService<TService> (this Microsoft.VisualStudio.Shell.IAsyncServiceContainer serviceContainer, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<object>> creator);
static member ProfferService : Microsoft.VisualStudio.Shell.IAsyncServiceContainer * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<obj>> -> unit
<Extension()>
Public Sub ProfferService(Of TService) (serviceContainer As IAsyncServiceContainer, creator As Func(Of CancellationToken, Task(Of Object)))

Type Parameters

TService

Service type

Parameters

serviceContainer
IAsyncServiceContainer

Service container to proffer to

creator
Func<CancellationToken,Task<Object>>

The creator function

Applies to

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.

public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static void ProfferService(Microsoft::VisualStudio::Shell::IAsyncServiceContainer ^ serviceContainer, Func<System::Threading::Tasks::Task<System::Object ^> ^> ^ creator);
public static void ProfferService<TService> (this Microsoft.VisualStudio.Shell.IAsyncServiceContainer serviceContainer, Func<System.Threading.Tasks.Task<object>> creator);
static member ProfferService : Microsoft.VisualStudio.Shell.IAsyncServiceContainer * Func<System.Threading.Tasks.Task<obj>> -> unit
<Extension()>
Public Sub ProfferService(Of TService) (serviceContainer As IAsyncServiceContainer, creator As Func(Of Task(Of Object)))

Type Parameters

TService

Service type

Parameters

serviceContainer
IAsyncServiceContainer

Service container to proffer to

creator
Func<Task<Object>>

The creator function

Applies to

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.

public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static void ProfferService(Microsoft::VisualStudio::Shell::IAsyncServiceContainer ^ serviceContainer, Func<System::Threading::CancellationToken, System::Threading::Tasks::Task<System::Object ^> ^> ^ creator, bool promote);
public static void ProfferService<TService> (this Microsoft.VisualStudio.Shell.IAsyncServiceContainer serviceContainer, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<object>> creator, bool promote);
static member ProfferService : Microsoft.VisualStudio.Shell.IAsyncServiceContainer * Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<obj>> * bool -> unit
<Extension()>
Public Sub ProfferService(Of TService) (serviceContainer As IAsyncServiceContainer, creator As Func(Of CancellationToken, Task(Of Object)), promote As Boolean)

Type Parameters

TService

Service type

Parameters

serviceContainer
IAsyncServiceContainer

Service container to proffer to

creator
Func<CancellationToken,Task<Object>>

The creator function

promote
Boolean

Indicates whether the service should be promoted to the parent service container

Applies to

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.

public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static void ProfferService(Microsoft::VisualStudio::Shell::IAsyncServiceContainer ^ serviceContainer, Func<System::Threading::Tasks::Task<System::Object ^> ^> ^ creator, bool promote);
public static void ProfferService<TService> (this Microsoft.VisualStudio.Shell.IAsyncServiceContainer serviceContainer, Func<System.Threading.Tasks.Task<object>> creator, bool promote);
static member ProfferService : Microsoft.VisualStudio.Shell.IAsyncServiceContainer * Func<System.Threading.Tasks.Task<obj>> * bool -> unit
<Extension()>
Public Sub ProfferService(Of TService) (serviceContainer As IAsyncServiceContainer, creator As Func(Of Task(Of Object)), promote As Boolean)

Type Parameters

TService

Service type

Parameters

serviceContainer
IAsyncServiceContainer

Service container to proffer to

creator
Func<Task<Object>>

The creator function

promote
Boolean

Indicates whether the service should be promoted to the parent service container

Applies to