public UsersController(IOptions <RabbitmqConfig> rabbitConfig, ISendEndpointProvider sendEndpoint, IPublishEndpoint publish, FakeStore fakeStore) { _fakeStore = fakeStore; _rabbitConfig = rabbitConfig.Value; _sendEndpoint = sendEndpoint; _publishEndPoint = publish; }
public void StartActivityMonitoring(RabbitmqConfig rabbitmqConfig) { _rabbitmqConfig = rabbitmqConfig; timer.Interval = 30000; timer.Elapsed += timer_Elapsed; timer.Start(); }
public SubscribeToCompanyConsumer(IOptions <RabbitmqConfig> rabbitConfig, ISendEndpointProvider sendEndpoint, IPublishEndpoint publish, FakeStore store) { _store = store; _rabbitConfig = rabbitConfig.Value; _sendEndpoint = sendEndpoint; _publishEndPoint = publish; }
public Service() { try { _receitaServices = new ReceitaService(new ReceitasRepository()); config = (RabbitmqConfig)System.Configuration.ConfigurationManager.GetSection("RabbitmqConfig"); InitializeComponent(); eventLog1.WriteEntry("Iniciando o monitoramento."); Singleton.ExecuteProperty.Instance.EventLog = eventLog1; } catch (Exception ex) { eventLog1.WriteEntry(ex.Message); } }
static IBusControl ConfigureBus(IServiceProvider provider) { _appConfig = provider.GetRequiredService <IOptions <RabbitmqConfig> >().Value; var bus = Bus.Factory.CreateUsingRabbitMq(cfg => { var host = cfg.Host(new Uri(_appConfig.Host), h => { h.Username(_appConfig.Username); h.Password(_appConfig.Password); }); cfg.ConfigureEndpoints(provider); }); return(bus); }
static void Mainaa(string[] args) { UnityContainer container = new UnityContainer(); IReceitaService _receitaServices = new ReceitaService(new ReceitasRepository()); RabbitmqConfig config = (RabbitmqConfig)System.Configuration.ConfigurationManager.GetSection("RabbitmqConfig"); //ReceitasThread t = new ReceitasThread(_receitaServices); //System.Threading.Thread fwt = new System.Threading.Thread(t.Start); //fwt.Start(); ReceitasAutoThread rat = new ReceitasAutoThread(_receitaServices); System.Threading.Thread fwt3 = new System.Threading.Thread(rat.Start); fwt3.Start(); while (true) { } }
public RabbitmqThread(RabbitmqConfig rabbitmqConfig) { this._rabbitmqConfig = rabbitmqConfig; }