Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 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.ServiceModel.Web;
  7. using System.Text;
  8.  
  9. namespace WcfService1
  10. {
  11. // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
  12. // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging.
  13. public class Service1 : IService1
  14. {
  15. public string GetData(int value)
  16. {
  17. return string.Format("You entered: {0}", value);
  18. }
  19.  
  20. public CompositeType GetDataUsingDataContract(CompositeType composite)
  21. {
  22. if (composite == null)
  23. {
  24. throw new ArgumentNullException("composite");
  25. }
  26. if (composite.BoolValue)
  27. {
  28. composite.StringValue += "Suffix";
  29. }
  30. return composite;
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement