public TServiceInterface CreateServiceProxy <TServiceInterface>(Uri serviceUri, ServicePartitionKey partitionKey = null, TargetReplicaSelector targetReplicaSelector = TargetReplicaSelector.Default, string listenerName = null) where TServiceInterface : IService { TServiceInterface proxy = _serviceProxyFactory.CreateServiceProxy <TServiceInterface>(serviceUri, partitionKey, targetReplicaSelector, listenerName); MethodResolver.AddMethodsForProxyOrService(proxy.GetType().GetInterfaces(), typeof(IService)); return(proxy); }
public CorrelatingRemotingMessageHandler(ServiceContext serviceContext, IService serviceImplementation) { _innerHandler = new ServiceRemotingMessageDispatcher(serviceContext, serviceImplementation); MethodResolver.AddMethodsForProxyOrService(serviceImplementation.GetType().GetInterfaces(), typeof(IService)); }