Service1.svc.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. namespace AipDbService
  9. {
  10. // 참고: "리팩터링" 메뉴에서 "이름 바꾸기" 명령을 사용하여 코드, svc 및 config 파일에서 클래스 이름 "Service1"을 변경할 수 있습니다.
  11. // 참고: 이 서비스를 테스트하기 위해 WCF 테스트 클라이언트를 시작하려면 솔루션 탐색기에서Service1.svc나 Service1.svc.cs를 선택하고 디버깅을 시작하십시오.
  12. public class Service1 : IService1
  13. {
  14. public string GetData(int value)
  15. {
  16. return string.Format("You entered: {0}", value);
  17. }
  18. public CompositeType GetDataUsingDataContract(CompositeType composite)
  19. {
  20. if (composite == null)
  21. {
  22. throw new ArgumentNullException("composite");
  23. }
  24. if (composite.BoolValue)
  25. {
  26. composite.StringValue += "Suffix";
  27. }
  28. return composite;
  29. }
  30. }
  31. }