Exemplo n.º 1
0
 private async Task RunInternetCheckLoop(Task firstInetCheck)
 {
     await firstInetCheck;
     await TaskV2.RunRepeated(async() => {
         HasInetAsync = RunInternetCheck();
         await HasInetAsync;
         return(true);
     }, delayInMsBetweenIterations : 3000, cancelToken : cancelToken.Token);
 }
Exemplo n.º 2
0
        public InternetStateManager()
        {
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
            TaskV2.RunRepeated(async() => {
                await HasInet(await RestFactory.instance.HasInternet());
                return(true);
            }, delayInMsBetweenIterations: 3000, cancelToken: cancelToken.Token);
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
        }