protected override async Task ExecuteAsync(CancellationToken cancellationToken) { IServiceScope serviceScope = serviceProvider.CreateScope(); IListenerService listenerService = serviceScope.ServiceProvider.GetService <IListenerService>(); await listenerService.Execute(cancellationToken); }
public HomeController(GeoplacementClickerDbContext dbContext, IListenerService listenerService, IConfiguration configuration) { _dbContext = dbContext; _listenerService = listenerService; }
public IListenerService GetListenerService() { if (fListenerService == null) { string r = ConfigurationManager.AppSettings["ListenerService"]; if (string.IsNullOrEmpty(r)) { fListenerService = new HttpListenerService(); } else { switch (r) { case "HttpListenerService": { fListenerService = new HttpListenerService(); break; } case "MemoryListenerService": { fListenerService = new MemoryListenerService(); break; } default: { fListenerService = new HttpListenerService(); break; } } } } return(fListenerService); }
private IListenerService _listenerService; // A listener that receives messages. public DataHandler(IListenerService listenerService, IClientService clientService) { _clientService = clientService; _listenerService = listenerService; _listenerService.StartListener(ReceivedInformation); } // End of Constructor
public Service1(IListenerService listenerService, ICommandService commandService) { _listenerService = listenerService; _commandService = commandService; InitializeComponent(); }
public AuthController(SignInManager <User> signInManager, UserManager <User> userManager, IOptions <GeneralConfig> generalConfig, IAccountService accountService, IOperationService operationService, IListenerService listener) { _signInManager = signInManager; _userManager = userManager; _generalConfig = generalConfig.Value; _accountService = accountService; _operationService = operationService; _listener = listener; }
public ValuesController(IHostedService listenerService, TestDataContext testDataContext) { this.listenerService = listenerService as IListenerService; if (this.listenerService is null) { throw new ArgumentException("IHostedService type must be of IListenerService"); } }
private IListenerService _listenerService; // A listener that receives messages. public DataHandler(IListenerService listenerService, IClientService clientService) { _clientService = clientService; _listenerService = listenerService; _listenerService.StartListener(UpdateOutputTextBoxesDuringEvents); _timer.Interval = TimeSpan.FromMilliseconds(5000); // Set the period of the events. _timer.Tick += sendData; // Attach handler _timer.Start(); } // End of Constructor
private void DoListen(Object aMsg) { try { if (fListener == null) { fListener = ActorServer.GetInstance().ListenerService; } IContextComm context = fListener.GetCommunicationContext(); RemoteReceiverActor.Cast(context); SendMessage("Listen"); } catch (Exception e) { Debug.WriteLine("Can't listen " + e); Become(new NullBehavior()); } }
private bool disposedValue = false; // Pour détecter les appels redondants protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // TODO: supprimer l'état managé (objets managés). if (fListenerService != null) { ((IDisposable)fListenerService).Dispose(); fListenerService = null; } } // TODO: libérer les ressources non managées (objets non managés) et remplacer un finaliseur ci-dessous. // TODO: définir les champs de grande taille avec la valeur Null. disposedValue = true; } }
public AppCache(IListenerService listenerService) { _listenerService = listenerService; }
public HostRelayActor(IListenerService listenerService) { fListener = listenerService; Become(new Behavior <String>(t => "Listen".Equals(t), DoListen)); }
public ClientManager(IListenerService listenerService, IPublisher publisher, IClientsContainer clientsContainer) { _listenerService = listenerService; _publisher = publisher; _clientsContainer = clientsContainer; }
public ChartController(IHubContext <ChartHub> hub, IListenerService listenerService) { _hub = hub; _listenerService = listenerService; }