Skip to content

Commit

Permalink
Change a "while" condition for an "if" in get resource operation
Browse files Browse the repository at this point in the history
  • Loading branch information
joseribes committed Jul 20, 2015
1 parent 7328962 commit c4db996
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Gists/ScoreAfterRetrieveAnomaly.cs
Expand Up @@ -16,8 +16,11 @@ static async void Main()
// retrieve a anomaly detector with a known ID
Anomaly anomaly;
string anomalyId = "anomaly/54daa82eaf447f5daa000XXY"; //Put your ID here
while ((anomaly = await client.Get<Anomaly>(anomalyId)).StatusMessage.StatusCode != Code.Finished) await Task.Delay(10);
Console.WriteLine(anomaly.StatusMessage.ToString());
if ((anomaly = await client.Get<Anomaly>(anomalyId)).StatusMessage.StatusCode != Code.Finished) {
Console.WriteLine("Error retrieving anomaly " + anomalyId);
} else {
Console.WriteLine(anomaly.StatusMessage.ToString());
}

//Input the data and calculate the score
var parameters = new AnomalyScore.Arguments();
Expand Down

0 comments on commit c4db996

Please sign in to comment.