static void Main(string[] args) { args = new[] { "LOCAL" }; IRestClient sericeClient; InProcessAppHost inProcHost = null; if (args.Length > 0 && args[0] == "LOCAL") { inProcHost = new InProcessAppHost(); inProcHost.Init(); inProcHost.Start("http://localhost:8888/"); sericeClient = new JsonServiceClient("http://localhost:8888"); } else { sericeClient = new JsonServiceClient("http://localhost:32284"); } EnableRequestTiming((JsonServiceClient)sericeClient); SuccessfulLogin(sericeClient); //InvalidLogin(sericeClient); //SuccessfulLogin2ShowsAlternativeReturnFormat(sericeClient); //BadLoginWithHttpErrorReturn(sericeClient); //BadLoginWithThrownException(sericeClient); Finish(inProcHost); }
private static void Finish(InProcessAppHost inProcHost) { Console.WriteLine("Press [enter] to exit"); Console.ReadLine(); if (inProcHost != null) { inProcHost.Stop(); inProcHost.Dispose(); } }
static void Main(string[] args) { args = new[] {"LOCAL"}; IRestClient sericeClient; InProcessAppHost inProcHost = null; if (args.Length > 0 && args[0] == "LOCAL") { inProcHost = new InProcessAppHost(); inProcHost.Init(); inProcHost.Start("http://localhost:8888/"); sericeClient = new JsonServiceClient("http://localhost:8888"); } else { sericeClient = new JsonServiceClient("http://localhost:32284"); } EnableRequestTiming((JsonServiceClient) sericeClient); SuccessfulLogin(sericeClient); //InvalidLogin(sericeClient); //SuccessfulLogin2ShowsAlternativeReturnFormat(sericeClient); //BadLoginWithHttpErrorReturn(sericeClient); //BadLoginWithThrownException(sericeClient); Finish(inProcHost); }