Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel;
- using System.Text;
- namespace WcfServiceLibrary1
- {
- // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
- [ServiceContract]
- public interface ICCalculator
- {
- [OperationContract]
- ComplexNum addCNum(ComplexNum n1, ComplexNum n2);
- [OperationContract]
- ComplexNum subtractCNum(ComplexNum n1, ComplexNum n2);
- [OperationContract]
- ComplexNum multiplyCNum(ComplexNum n1, ComplexNum n2);
- [OperationContract]
- ComplexNum divideCNum(ComplexNum n1, ComplexNum n2);
- }
- [DataContract]
- public class ComplexNum
- {
- private string desc = "Complex number";
- [DataMember] public double realPart;
- [DataMember] public double imagPart;
- [DataMember]
- public string Desc
- {
- get
- {
- return desc;
- }
- set { desc = value; }
- }
- public ComplexNum(double rp, double ip)
- {
- this.realPart = rp;
- this.imagPart = ip;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement