public async override void WillEnterForeground(UIApplication application) {// tu backgroud mo len. IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>(); await hubConnectionService.ReStart(); Console.WriteLine("App will enter foreground"); }
// bi che mat 1 phan protected async override void OnPause() { base.OnPause(); Console.WriteLine("OnPause , App bi che"); IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>(); await hubConnectionService.Stop(); }
public OtherTabTerminationListener( IConnectionMultiplexer multiplexer, IHubConnectionService hubConnectionService) { subscriber = multiplexer.GetSubscriber(); this.hubConnectionService = hubConnectionService; }
protected async override void OnResume() { Console.WriteLine("OnResume restart hub"); base.OnResume(); IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>(); await hubConnectionService.ReStart(); }
public SessionHub( IHubConnectionService hubConnectionService, ISessionService sessionService) { this.hubConnectionService = hubConnectionService; this.sessionService = sessionService; }
public OrderAuthenticationStateProvider( HttpClient httpClient, IHubConnectionService hubConnectionService, ILocalStorageService localStorage) { this.httpClient = httpClient; this.hubConnectionService = hubConnectionService; this.localStorage = localStorage; }
/// <summary> /// Generate a new instance of the airplane selector service. /// </summary> /// <param name="webClientService">The Web API service.</param> /// <param name="hubConnectionService">The hub connection</param> /// <param name="randomDataService">The random data generator.</param> /// <param name="logger">The logger the service will use.</param> public AirplaneSelectorService(IWebClientService webClientService, IHubConnectionService hubConnectionService, IRandomDataService randomDataService, ILogger <IAirplaneSelectorService> logger) { this.webClientService = webClientService; this.randomDataService = randomDataService; this.logger = logger; Task.WaitAll(GetAirplanesFromAPI()); hubConnectionService.Listen <ICollection <Airplane> >("AirplaneUpdates", a => airplanes = a); }
public SessionExpirationService( ILogLevelMapper logLevelMapper, ISessionRepository sessionRepository, ISessionService sessionLifecycleService, IHubConnectionService hubConnectionService, ILogger <SessionExpirationService> logger, SessionSettings sessionSettings) : base(logLevelMapper, logger) { this.sessionRepository = sessionRepository; this.sessionLifecycleService = sessionLifecycleService; this.hubConnectionService = hubConnectionService; this.logger = logger; this.sessionSettings = sessionSettings; }
// not guaranteed that this will run public async override void WillTerminate(UIApplication application) { IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>(); await hubConnectionService.Stop(); }
public async override void DidEnterBackground(UIApplication application) { Console.WriteLine("App entering background state."); IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>(); await hubConnectionService.Stop(); }
public MainWindowVM(IHubConnectionService connection) { this.connection = connection; }
public MainHub(IHubConnectionService hubConnectionService) { _hubConnectionService = hubConnectionService; }
public StateStore(IHubConnectionService hubConnection) { store = new(); }
public HubController(IHubConnectionService connection) { _connection = connection; _connection.Run(); }