Exemple #1
0
        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);
        }
Exemple #2
0
        private static void Finish(InProcessAppHost inProcHost)
        {
            Console.WriteLine("Press [enter] to exit");
            Console.ReadLine();

            if (inProcHost != null)
            {
                inProcHost.Stop();
                inProcHost.Dispose();
            }
        }
Exemple #3
0
        private static void Finish(InProcessAppHost inProcHost)
        {
            Console.WriteLine("Press [enter] to exit");
            Console.ReadLine();

            if (inProcHost != null)
            {
                inProcHost.Stop();
                inProcHost.Dispose();
            }
        }
Exemple #4
0
        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);
        }