public OutageNotification(string subscriberName, IOutageMapper mapper)
        {
            _subscriberName = subscriberName;

            _mapper     = mapper;
            _dispatcher = new OutageHubDispatcher(_mapper);
        }
 public OutageHubDispatcher(IOutageMapper mapper)
 {
     this.mapper        = mapper;
     this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";
     this.connection    = new HubConnectionBuilder().WithUrl(outageHubUrl)
                          .Build();
 }
예제 #3
0
        public NotifySubscriberProvider(string subscriberName)
        {
            this.baseLogString = $"{this.GetType()} [{this.GetHashCode()}] =>{Environment.NewLine}";
            Logger.LogDebug($"{baseLogString} Ctor => Logger initialized");

            _subscriberName = subscriberName;
            _graphMapper    = new GraphMapper();
            _outageMapper   = new OutageMapper(new ConsumerMapper(), new EquipmentMapper());
        }
        public OutageHubDispatcher(IOutageMapper mapper)
        {
            _url     = AppSettings.Get <string>(HubAddress.OutageHubUrl);
            _hubName = AppSettings.Get <string>(HubAddress.OutageHubName);

            _connection = new HubConnection(_url);
            _proxy      = _connection.CreateHubProxy(_hubName);

            _mapper = mapper;
        }
예제 #5
0
 public OutageQueryHandler(IOutageMapper mapper)
 {
     _mapper = mapper;
 }
예제 #6
0
 public OutageQueryHandler(ILogger logger, IOutageMapper mapper, IProxyFactory factory)
 {
     _logger       = logger;
     _mapper       = mapper;
     _proxyFactory = factory;
 }