コード例 #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
ファイル: WorkerRole.cs プロジェクト: Stasa96/Cloud-Computing
 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?
            }
        }