public SignalRTriggerBindingProvider(ISignalRTriggerDispatcher dispatcher, INameResolver nameResolver, SignalROptions options, Exception webhookException)
 {
     _dispatcher       = dispatcher ?? throw new ArgumentNullException(nameof(dispatcher));
     _nameResolver     = nameResolver ?? throw new ArgumentNullException(nameof(nameResolver));
     _options          = options ?? throw new ArgumentNullException(nameof(options));
     _webhookException = webhookException;
 }
 public SignalRConfigProvider(
     IOptions <SignalROptions> options,
     INameResolver nameResolver,
     ILoggerFactory loggerFactory)
 {
     this.options      = options.Value;
     this.logger       = loggerFactory.CreateLogger("SignalR");
     this.nameResolver = nameResolver;
 }
Пример #3
0
        private static void ApplyConfiguration(IConfiguration config, SignalROptions options)
        {
            if (config == null)
            {
                return;
            }

            config.Bind(options);
        }
Пример #4
0
 public SignalRConfigProvider(
     IOptions <SignalROptions> options,
     INameResolver nameResolver,
     ILoggerFactory loggerFactory,
     IConfiguration configuration,
     ISecurityTokenValidator securityTokenValidator = null,
     ISignalRConnectionInfoConfigurer signalRConnectionInfoConfigurer = null)
 {
     this.options         = options.Value;
     this.loggerFactory   = loggerFactory;
     this.logger          = loggerFactory.CreateLogger(LogCategories.CreateTriggerCategory("SignalR"));
     this.nameResolver    = nameResolver;
     this.configuration   = configuration;
     this._dispatcher     = new SignalRTriggerDispatcher();
     inputBindingProvider = new InputBindingProvider(configuration, nameResolver, securityTokenValidator, signalRConnectionInfoConfigurer);
 }
        private static void ApplyConfiguration(IConfiguration config, SignalROptions options)
        {
            if (config == null)
            {
                return;
            }

            config.Bind(options);

            var hubName = config.GetValue <string>("hubName");

            if (!string.IsNullOrEmpty(hubName))
            {
                options.HubName = hubName;
            }
        }
Пример #6
0
        public static AzureSignalRClient GetAzureSignalRClient(string attributeConnectionString, string attributeHubName, SignalROptions options = null)
        {
            var connectionString = FirstOrDefault(attributeConnectionString, options?.ConnectionString);
            var hubName          = FirstOrDefault(attributeHubName, options?.HubName);

            return(new AzureSignalRClient(StaticServiceHubContextStore.ServiceManagerStore, connectionString, hubName));
        }