Exemplo n.º 1
0
        protected override void OnStart(string[] args)
        {
            var sqlConnectionString      = ConfigurationManager.AppSettings["SqlConnectionString"];
            var rabbitMqConnectionString = ConfigurationManager.AppSettings["RabbitMqConnectionString"];

            _context = new EmpiriCallDbContext(new SqlConnection(sqlConnectionString));

            using (var bus = RabbitHutch.CreateBus(rabbitMqConnectionString))
            {
                bus.Subscribe <QueueMessage>("EmpiriCallQueueMessage", SaveRecordToDatabase);
                if (_showConsole)
                {
                    Console.WriteLine("Now listening for messages of type: " + typeof(QueueMessage).FullName);
                    Console.WriteLine("Press ENTER to stop.");
                    Console.ReadLine();
                }
            }

            base.OnStart(args);
        }
 public QueryHandlerGetLatestMetaData(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public CommandHandlerAddRecord(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public CommandHandlerMapFeature(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public CommandHandlerAddNewMetaDataVersion(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public CommandHandlerUpdateFeatures(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 7
0
 public CommandHandlerCreateMetaDataIfNecessary(EmpiriCallDbContext context)
 {
     _context = context;
 }
Exemplo n.º 8
0
 public QueryHandlerRawDetail(EmpiriCallDbContext context)
 {
     _context = context;
 }