WCF终结点和寻址之--AddressHead信息匹配代码
Contracts契约
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.ServiceModel; 6 7 namespace Artech.WcfServices.Contracts 8 { 9 [ServiceContract(Name="CalculatorService",Namespace="http://www.artech.com/")] 10 public interface ICalculator 11 { 12 13 [OperationContract] 14 double Add(double x, double y); 15 16 [OperationContract] 17 double Subtract(double x, double y); 18 19 [OperationContract] 20 double Multiply(double x, double y); 21 22 [OperationContract] 23 double Divide(double x, double y); 24 } 25 }