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;
- using System.Threading;
- namespace WcfServiceLibrary1
- {
- [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
- // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
- public class myCCalculator : ICCalculator
- {
- public ComplexNum addCNum(ComplexNum n1, ComplexNum n2)
- {
- Console.WriteLine("...called addCNum(...)");
- return new ComplexNum(n1.realPart + n2.realPart,
- n1.imagPart + n2.imagPart);
- }
- public ComplexNum subtractCNum(ComplexNum n1, ComplexNum n2)
- {
- Console.WriteLine("...called subtractCNum(...)");
- return new ComplexNum(n1.realPart - n2.realPart,
- n1.imagPart - n2.imagPart);
- }
- public ComplexNum multiplyCNum(ComplexNum n1, ComplexNum n2)
- {
- Console.WriteLine("...called multiplyCNum(...)");
- return new ComplexNum(n1.realPart * n2.realPart,
- n1.imagPart * n2.imagPart);
- }
- public ComplexNum divideCNum(ComplexNum n1, ComplexNum n2)
- {
- Console.WriteLine("...called divideCNum(...)");
- return new ComplexNum(n1.realPart / n2.realPart,
- n1.imagPart / n2.imagPart);
- }
- }
- }
Add Comment
Please, Sign In to add comment