다음을 통해 공유


PackageUtilities.ProfferService<TService, TImpl> Method

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Sub ProfferService(Of TService, TImpl As New) ( _
    serviceContainer As IServiceContainer _
)
public static void ProfferService<TService, TImpl>(
    IServiceContainer serviceContainer
)
where TImpl : new()
public:
generic<typename TService, typename TImpl>
where TImpl : gcnew()
static void ProfferService(
    IServiceContainer^ serviceContainer
)
static member ProfferService : 
        serviceContainer:IServiceContainer -> unit   when 'TImpl : new()
JScript does not support generic types or methods.

Type Parameters

  • TService
    The type of service.
  • TImpl
    The type that implements < TService.

Parameters

  • serviceContainer
    Type: IServiceContainer

    The service container to proffer to.

.NET Framework Security

See Also

Reference

PackageUtilities Class

Microsoft.VisualStudio.Shell Namespace