摘要:
契约的设计1namespaceMyService2{3[ServiceContract]4publicinterfaceIPerson5{6[OperationContract]7stringSay(stringsay);8}9[ServiceContract]10publicinterfaceIStudent:IPerson11{12[OperationContract]13stringStudy(stringstudy);14}15}契约的服务类型1namespaceMyService2{3publicclassService1:IStudent4{5publicstringStudy(s 阅读全文
posted @ 2012-09-22 22:47
HelloCG
阅读(243)
评论(0)
推荐(0)
摘要:
一、服务端:新建WCF服务应用程序1,服务契约1[ServiceContract]2publicinterfaceICalculator3{4[OperationContract(Name="AddInt")]5intAdd(intarg1,intarg2);67[OperationContract(Name="AddDouble")]8doubleAdd(doublearg1,doublearg2);9}2,实现契约的服务类型1namespaceMyService2{3publicclassService1:ICalculator4{5publicin 阅读全文
posted @ 2012-09-22 11:49
HelloCG
阅读(959)
评论(1)
推荐(0)