Exemple #1
0
        private static IServiceConnectionContainer CreateContainer(IServiceConnectionFactory serviceConnectionFactory, ServiceEndpoint endpoint, string hub, int count, IServiceEndpointManager endpointManager, ILoggerFactory loggerFactory)
        {
            var provider          = endpointManager.GetEndpointProvider(endpoint);
            var connectionFactory = new ConnectionFactory(hub, provider, loggerFactory);

            if (endpoint.EndpointType == EndpointType.Primary)
            {
                return(new StrongServiceConnectionContainer(serviceConnectionFactory, connectionFactory, count, endpoint));
            }
            else
            {
                return(new WeakServiceConnectionContainer(serviceConnectionFactory, connectionFactory, count, endpoint));
            }
        }
Exemple #2
0
 public abstract IServiceEndpointProvider GetEndpointProvider(ServiceEndpoint endpoint);