PageRenderTime 53ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/ExpressInteropBinding/WCFInteroperableServiceApplicationTemplate/Service.svc.cs

#
C# | 28 lines | 25 code | 2 blank | 1 comment | 3 complexity | cd9c58a5718964b0b8e2aa03aba4efd7 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, Apache-2.0
  1. using System;
  2. using System.Collections.Generic;
  3. $if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
  4. $endif$using System.Runtime.Serialization;
  5. using System.ServiceModel;
  6. using System.Text;
  7. // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service" in code, svc and config file together.
  8. public class Service : IService
  9. {
  10. public string GetData(int value)
  11. {
  12. return string.Format("You entered: {0}", value);
  13. }
  14. public CompositeType GetDataUsingDataContract(CompositeType composite)
  15. {
  16. if (composite == null)
  17. {
  18. throw new ArgumentNullException("composite");
  19. }
  20. if (composite.BoolValue)
  21. {
  22. composite.StringValue += "Suffix";
  23. }
  24. return composite;
  25. }
  26. }