public NotificationHubAsyncCollector(INotificationHubClientService clientService, string tagExpression, bool enableTestSend, TraceWriter traceWriter)
 {
     _notificationHubclientService = clientService;
     _tagExpression  = tagExpression;
     _enableTestSend = enableTestSend;
     _traceWriter    = traceWriter;
 }
Example #2
0
        internal NotificationHubClient BindForNotificationHubClient(NotificationHubAttribute attribute)
        {
            string resolvedConnectionString       = ResolveConnectionString(attribute.ConnectionStringSetting);
            string resolvedHubName                = ResolveHubName(attribute.HubName);
            INotificationHubClientService service = GetService(resolvedConnectionString, resolvedHubName, attribute.EnableTestSend);

            return(service.GetNotificationHubClient());
        }
Example #3
0
        internal IAsyncCollector <Notification> BuildFromAttribute(NotificationHubAttribute attribute)
        {
            string resolvedConnectionString = ResolveConnectionString(attribute.ConnectionStringSetting);
            string resolvedHubName          = ResolveHubName(attribute.HubName);

            INotificationHubClientService service = GetService(resolvedConnectionString, resolvedHubName);

            return(new NotificationHubAsyncCollector(service, attribute.TagExpression));
        }
Example #4
0
        internal IAsyncCollector <Notification> BuildFromAttribute(NotificationHubAttribute attribute, TraceWriter trace)
        {
            string resolvedConnectionString = ResolveConnectionString(attribute.ConnectionStringSetting);
            string resolvedHubName          = ResolveHubName(attribute.HubName);
            bool   enableTestSend           = attribute.EnableTestSend;

            INotificationHubClientService service = GetService(resolvedConnectionString, resolvedHubName, enableTestSend);

            return(new NotificationHubAsyncCollector(service, attribute.TagExpression, attribute.EnableTestSend, trace));
        }
        public NotificationHubClient Convert(NotificationHubAttribute attribute)
        {
            if (attribute == null)
            {
                throw new ArgumentNullException(nameof(attribute));
            }

            string resolvedConnectionString       = _config.ResolveConnectionString(attribute.ConnectionStringSetting);
            string resolvedHubName                = _config.ResolveHubName(attribute.HubName);
            INotificationHubClientService service = _config.GetService(resolvedConnectionString, resolvedHubName, attribute.EnableTestSend);

            return(service.GetNotificationHubClient());
        }
Example #6
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="notificationHubClientService">NotificationHubsと接続するクライアント</param>
 /// <param name="logger">ログ出力用オブジェクト</param>
 public NotificationController(INotificationHubClientService notificationHubClientService, ILogger <NotificationController> logger)
 {
     this.logger = logger;
     this.notificationHubClientService = notificationHubClientService;
 }
Example #7
0
 public NotificationHubAsyncCollector(INotificationHubClientService clientService, string tagExpression)
 {
     _notificationHubclientService = clientService;
     _tagExpression = tagExpression;
 }