예제 #1
0
 private async Task RunAsync(CancellationToken cancellationToken)
 {
     // TODO: Replace the following with your own logic.
     while (!cancellationToken.IsCancellationRequested)
     {
         proxy.IAmAlive();
         await Task.Delay(1000);
     }
 }
예제 #2
0
 private async Task RunAsync(CancellationToken cancellationToken)
 {
     
     // TODO: Replace the following with your own logic.
     while (!cancellationToken.IsCancellationRequested)
     {
         Trace.TraceInformation("Working");
         if(++i > 5) { break; }
         Trace.WriteLine( proxy.IAmAlive());
         await Task.Delay(5000);
     }
 }
예제 #3
0
파일: WorkerRole.cs 프로젝트: Aco96/GitHub
        private async Task RunAsync(CancellationToken cancellationToken)
        {
            int brojac = 0;

            // TODO: Replace the following with your own logic.
            while (!cancellationToken.IsCancellationRequested)
            {
                proxy.IAmAlive();
                Trace.WriteLine(++brojac + "I am alive.");
                Trace.TraceInformation("Working");
                await Task.Delay(5000);     // Zasto radi na 5 sekundi a na 2 ne server ne stane na 5 nego 13?
            }
        }