示例#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;
 }
示例#3
0
 public CommandHandlerAddRecord(EmpiriCallDbContext context)
 {
     _context = context;
 }
示例#4
0
 public CommandHandlerMapFeature(EmpiriCallDbContext context)
 {
     _context = context;
 }
示例#5
0
 public CommandHandlerAddNewMetaDataVersion(EmpiriCallDbContext context)
 {
     _context = context;
 }
示例#6
0
 public CommandHandlerUpdateFeatures(EmpiriCallDbContext context)
 {
     _context = context;
 }
示例#7
0
 public CommandHandlerCreateMetaDataIfNecessary(EmpiriCallDbContext context)
 {
     _context = context;
 }
 public QueryHandlerRawDetail(EmpiriCallDbContext context)
 {
     _context = context;
 }