ServiceProviderExtensions.GetCOMService(IServiceProvider, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.