IService1.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // 참고: "리팩터링" 메뉴에서 "이름 바꾸기" 명령을 사용하여 코드 및 config 파일에서 인터페이스 이름 "IService1"을 변경할 수 있습니다.
  11. [ServiceContract]
  12. public interface IService1
  13. {
  14. [OperationContract]
  15. string GetData(int value);
  16. [OperationContract]
  17. CompositeType GetDataUsingDataContract(CompositeType composite);
  18. // TODO: 여기에 서비스 작업을 추가합니다.
  19. }
  20. // 아래 샘플에 나타낸 것처럼 데이터 계약을 사용하여 복합 형식을 서비스 작업에 추가합니다.
  21. [DataContract]
  22. public class CompositeType
  23. {
  24. bool boolValue = true;
  25. string stringValue = "Hello ";
  26. [DataMember]
  27. public bool BoolValue
  28. {
  29. get { return boolValue; }
  30. set { boolValue = value; }
  31. }
  32. [DataMember]
  33. public string StringValue
  34. {
  35. get { return stringValue; }
  36. set { stringValue = value; }
  37. }
  38. }
  39. }