private static IServiceConnectionContainer CreateContainer(IServiceConnectionFactory serviceConnectionFactory, HubServiceEndpoint endpoint, int count, ILoggerFactory loggerFactory) { if (endpoint.EndpointType == EndpointType.Primary) { return(new StrongServiceConnectionContainer(serviceConnectionFactory, count, endpoint, loggerFactory.CreateLogger <StrongServiceConnectionContainer>())); } else { return(new WeakServiceConnectionContainer(serviceConnectionFactory, count, endpoint, loggerFactory.CreateLogger <WeakServiceConnectionContainer>())); } }
public StrongServiceConnectionContainer(IServiceConnectionFactory serviceConnectionFactory, int fixedConnectionCount, HubServiceEndpoint endpoint, ILogger logger = null) : base(serviceConnectionFactory, fixedConnectionCount, endpoint, logger: logger) { _onDemandServiceConnections = new List <IServiceConnection>(); }