在这个例子中,我们将实现一个简单的计算服务(CalculatorService),提供基本的加、减、乘、除的运算。和传统的分布式通信框架一样,WCF本质上提供一个跨进程、跨机器以致跨网络的服务调用。
基于28个网页-相关网页
下面代码片断表示服务契约(ICalculator)和服务类型(CalculatorService)的定义。为了简洁,在服务契约接口中,我们仅仅定义了唯一一个用于进行两个整数触发预算的方法Divide。
基于24个网页-相关网页
下面代码片断表示服务契约(ICalculator)和服务类型(CalculatorService)的定义。为了简洁,在服务契约接口中,我们仅仅定义了唯一一个用于进行两个整数触发预算的方法Divide。
基于12个网页-相关网页
An Enterprise Application project (J2EE 1.3) called CalculatorService.
称为CalculatorService的企业应用程序项目(Enterprise Application project (J2EE 1.3))。
An Enterprise Application Project (J2EE 1.3) called CalculatorService.
名为CalculatorService的企业应用程序项目(J2EE 1.3)。
You can see that the implementation of the add() method on the CalculatorService no longer obtains the calcID identifying the calculator state as an input parameter.
您可以看到, CalculatorService 中的 add() 方法的实现不再获得 calcID 来确定作为输入参数的计算器状态。
应用推荐