單項選擇題

A Windows Communication Foundation (WCF) service implements the following contract. [ServiceContract] public interface IHelloService { [OperationContract(WebGet(UriTemplate="hello?name={name}"))] string SayHello(string name);}The implementation is as follows:public class HelloService: IHelloService { public string SayHello(string name) { return "Hello " + name; }}The service is self-hosted, and the hosting code is as follows:WebServiceHost svcHost = CreateHost();svcHost.Open();Console.ReadLine();svcHost.Close();You need to implement CreateHost so that the service has a single endpoint hosted at http://localhost:8000/HelloService.Which code segment should you use?()

A.
B.
C.
D.

題目列表

你可能感興趣的試題

微信掃碼免費(fèi)搜題