Beispiel #1
0
 internal MessagingHubConnection(
     TimeSpan sendTimeout,
     int maxConnectionRetries,
     IOnDemandClientChannelFactory onDemandClientChannelFactory,
     int channelCount)
 {
     _semaphore                    = new SemaphoreSlim(1);
     MaxConnectionRetries          = maxConnectionRetries;
     SendTimeout                   = sendTimeout;
     _onDemandClientChannelFactory = onDemandClientChannelFactory;
     _channelCount                 = channelCount;
 }
Beispiel #2
0
 private void SubstituteOnDemandClientChannelFactory()
 {
     OnDemandClientChannelFactory = Substitute.For <IOnDemandClientChannelFactory>();
     OnDemandClientChannelFactory.ChannelBuilder.Returns(EstablishedClientChannelBuilder);
     OnDemandClientChannelFactory.Create(1).Returns(OnDemandClientChannel);
 }