Example #1
0
 public ActionModel(ILoggerFactory loggerFactory, IPersistenceProvider persistenceProvider, FcmMessageHandler fcmMessageHandler,
                    IAmqpService amqpService) : base(loggerFactory)
 {
     _persistenceProvider = persistenceProvider;
     _fcmMessageHandler   = fcmMessageHandler;
     _amqpService         = amqpService;
 }
 public ConfigChangeModel(ILoggerFactory loggerFactory, ValueHandler valueHandler,
                          IConfigService configService, IPersistenceProvider persistenceProvider, FcmMessageHandler fcmHandler) : base(loggerFactory)
 {
     _valueHandler        = valueHandler;
     _configService       = configService;
     _persistenceProvider = persistenceProvider;
     _fcmHandler          = fcmHandler;
 }
        public AmqpListenerService(IPersistenceProvider persistenceProvider, FcmMessageHandler fcmMessageHandler,
                                   IConfiguration configuration)
        {
            _PersistenceProvider = persistenceProvider;
            _FcmMessageHandler   = fcmMessageHandler;

            var connectionString = configuration.GetValue <string>("AmqpServiceConfig:ConnectionString")
                                   ?? throw new Exception("Config item AmqpServiceConfig:ConnectionString is missing.");
            var clientName = configuration.GetValue <string>("AmqpServiceConfig:ClientName")
                             ?? throw new Exception("Config item AmqpServiceConfig:ClientName is missing.");
            var queueName = configuration.GetValue <string>("AmqpServiceConfig:QueueName")
                            ?? throw new Exception("Config item AmqpServiceConfig:QueueName is missing.");

            _AmqpListener = new AmqpListener(connectionString, clientName, queueName, OnMessageReceived);
            _queueName    = queueName; //For logging purposes
        }
Example #4
0
 public TestEndPoint(ILoggerFactory loggerFactory, FcmMessageHandler fcmMessageHandler) : base(loggerFactory)
 {
     _FcmMessageHandler = fcmMessageHandler;
 }