예제 #1
0
 public SubscriptionHandler(
     IHubConnectionProvider provider,
     IRegistrationDescriptionFactory registrationDescriptionFactory,
     ILogger <SubscriptionHandler> logger)
 {
     _registrationDescriptionFactory = registrationDescriptionFactory;
     _logger    = logger;
     _hubClient = provider.Get();
 }
예제 #2
0
        public SignalRHubConnectionService(IHubConnectionProviderFactory hubConnectionProviderFactory, IHubProxyProviderFactory hubProxyProviderFactory)
        {
            Guard.WhenArgument(hubConnectionProviderFactory, nameof(IHubConnectionProviderFactory)).IsNull().Throw();
            Guard.WhenArgument(hubProxyProviderFactory, nameof(IHubProxyProviderFactory)).IsNull().Throw();

            this.hubConnectionProvider   = hubConnectionProviderFactory.CreateHubConnectionProvider(SignalRHubConnectionService.HubConnectionAzure);
            this.hubProxyProviderFactory = hubProxyProviderFactory;

            this.hubProxyProviders = new Dictionary <string, IHubProxyProvider>();

            this.StartHubConnection(this.hubConnectionProvider);
        }
예제 #3
0
 public ApnsSender(IHubConnectionProvider provider) : base(provider)
 {
 }
예제 #4
0
 private void StopHubConnection(IHubConnectionProvider hubConnectionProvider)
 {
     hubConnectionProvider.Stop();
 }
예제 #5
0
 private void StartHubConnection(IHubConnectionProvider hubConnectionProvider)
 {
     hubConnectionProvider.Start().Wait();
 }
 protected Sender(IHubConnectionProvider provider)
 {
     HubClient = provider.Get();
 }