patryk_szwed

service1

May 13th, 2019
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.Serialization;
  5. using System.ServiceModel;
  6. using System.Text;
  7. using System.Threading;
  8.  
  9. namespace WcfServiceLibrary1
  10. {
  11. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
  12. // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
  13. public class myCCalculator : ICCalculator
  14. {
  15. public ComplexNum addCNum(ComplexNum n1, ComplexNum n2)
  16. {
  17. Console.WriteLine("...called addCNum(...)");
  18. return new ComplexNum(n1.realPart + n2.realPart,
  19. n1.imagPart + n2.imagPart);
  20. }
  21.  
  22. public void Function1(string s1)
  23. {
  24. Console.WriteLine("...{0}: Function1 - start", s1);
  25. Thread.Sleep(3000);
  26. Console.WriteLine("....{0} Function1 - stop", s1);
  27. }
  28.  
  29. public void Function2(string s2)
  30. {
  31. Console.WriteLine("...{0}: Function2 - start", s2);
  32. Thread.Sleep(3000);
  33. Console.WriteLine("....{0} Function2 - stop", s2);
  34. }
  35. }
  36. }
Add Comment
Please, Sign In to add comment