示例#1
0
文件: MyServices.cs 项目: mythz/site
        public void Can_Call_Hello_Service_Url()
        {
            var           client   = new JsonServiceClient("https://localhost:5001");
            HelloResponse response = client.Get <HelloResponse>("/hello?Name=World");

            Console.WriteLine(response.Result); //Hi, World!
        }
示例#2
0
文件: MyServices.cs 项目: mythz/site
        public void Can_Call_Hello_Service_Dti()
        {
            var           client   = new JsonServiceClient("https://localhost:5001");
            HelloResponse response = client.Get(new Hello {
                Name = "World"
            });

            Console.WriteLine(response.Result); //Hi, World!
        }