static void Main(string[] args)
{
var client = new DataClient(new Uri("http://*****:*****@"{0}\ClientConfig.xml", AppDomain.CurrentDomain.BaseDirectory));
var pulse = client.Pulse();
if (pulse.Result != null)
{
Console.WriteLine("service status: {0}", pulse.Result.Status);
var response = TestAdd(client);
if (response != null)
{
OutputResponse(response);
//expecting Id
var records = response.Payload.Data.Records;
if (records.Any())
{
Console.WriteLine("record created, press enter to update the record");
Console.ReadLine();
response = TestUpdate(client, records.First());
OutputResponse(response);
}
Console.WriteLine("record updated");
}
else
Console.WriteLine("oops");
}
else
Console.WriteLine("service down");
Console.Read();
}