Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public CorrelatingRemotingMessageHandler(ServiceContext serviceContext, IService serviceImplementation)
        {
            _innerHandler = new ServiceRemotingMessageDispatcher(serviceContext, serviceImplementation);

            MethodResolver.AddMethodsForProxyOrService(serviceImplementation.GetType().GetInterfaces(), typeof(IService));
        }