patryk_szwed

iservice2

May 13th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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.  
  8. namespace WcfServiceLibrary2
  9. {
  10. // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
  11. [ServiceContract (SessionMode = SessionMode.Required, CallbackContract = typeof(ICallbackHandler))]
  12. public interface ICallbackKalkulator
  13. {
  14.  
  15. // TODO: Add your service operations here
  16. [OperationContract(IsOneWay = true)]
  17. void Factorial(double n);
  18.  
  19. [OperationContract(IsOneWay = true)]
  20. void CalcSomething(int sek);
  21. }
  22.  
  23. public interface ICallbackHandler
  24. {
  25. [OperationContract(IsOneWay = true)]
  26. void FactorialCB(double result);
  27.  
  28. [OperationContract(IsOneWay = true)]
  29. void CalcSomethingCB(string result);
  30. }
  31. }
Add Comment
Please, Sign In to add comment