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");
        }
示例#2
0
 // 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;
 }
示例#4
0
 protected async override void OnResume()
 {
     Console.WriteLine("OnResume restart hub");
     base.OnResume();
     IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>();
     await hubConnectionService.ReStart();
 }
示例#5
0
 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;
 }
示例#7
0
 /// <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();
 }
示例#10
0
 public async override void DidEnterBackground(UIApplication application)
 {
     Console.WriteLine("App entering background state.");
     IHubConnectionService hubConnectionService = DependencyService.Get <IHubConnectionService>();
     await hubConnectionService.Stop();
 }
示例#11
0
 public MainWindowVM(IHubConnectionService connection)
 {
     this.connection = connection;
 }
示例#12
0
 public MainHub(IHubConnectionService hubConnectionService)
 {
     _hubConnectionService = hubConnectionService;
 }
示例#13
0
 public StateStore(IHubConnectionService hubConnection)
 {
     store = new();
 }
 public HubController(IHubConnectionService connection)
 {
     _connection = connection;
     _connection.Run();
 }