Share via


ServiceProviderExtensions.GetCOMService(IServiceProvider, Type) Method

Definition

Attempts to return a service from a remote provider enabled for COM interfacing.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ GetCOMService(IServiceProvider ^ provider, Type ^ type);
public static object GetCOMService (this IServiceProvider provider, Type type);
static member GetCOMService : IServiceProvider * Type -> obj
<Extension()>
Public Function GetCOMService (provider As IServiceProvider, type As Type) As Object

Parameters

provider
IServiceProvider

The remote service provider.

type
Type

The type of service being requested.

Returns

The associated service enabled for COM interfacing if it is possible; otherwise whatever the service provider provides. May return null.

Applies to