Class IceServiceProviderExtensions
- Namespace
- IceRpc.Extensions.DependencyInjection
- Assembly
- IceRpc.Ice.dll
Provides extension methods for IServiceProvider to create Ice proxies.
public static class IceServiceProviderExtensions
- Inheritance
-
IceServiceProviderExtensions
- Inherited Members
Methods
CreateIceProxy<TProxy>(IServiceProvider, ServiceAddress?)
Creates an Ice proxy with this service provider.
public static TProxy CreateIceProxy<TProxy>(this IServiceProvider provider, ServiceAddress? serviceAddress = null) where TProxy : struct, IIceProxy
Parameters
providerIServiceProviderThe service provider.
serviceAddressServiceAddressThe service address of the new proxy; null is equivalent to the default service address for the proxy type.
Returns
- TProxy
A new instance of
TProxy.
Type Parameters
TProxyThe Ice proxy struct.
Remarks
The new proxy uses the IInvoker retrieved from provider as its
invocation pipeline, and the IceEncodeOptions retrieved from provider as
its encode options.
CreateIceProxy<TProxy>(IServiceProvider, Uri)
Creates an Ice proxy with this service provider.
public static TProxy CreateIceProxy<TProxy>(this IServiceProvider provider, Uri serviceAddressUri) where TProxy : struct, IIceProxy
Parameters
providerIServiceProviderThe service provider.
serviceAddressUriUriThe service address of the proxy as a URI.
Returns
- TProxy
A new instance of
TProxy.
Type Parameters
TProxyThe Ice proxy struct.
Remarks
The new proxy uses the IInvoker retrieved from provider as its
invocation pipeline, and the IceEncodeOptions retrieved from provider as
its encode options.