728x90
728x170
using System;
using System.Collections;
using System.ServiceModel;
namespace TestProject
{
/// <summary>
/// 상점 인터페이스
/// </summary>
[ServiceContract(Namespace="http://company.com/bookstore")]
public interface IBookStore
{
//////////////////////////////////////////////////////////////////////////////////////////////////// Method
#region 주문하기 - Order(userID, isbn, amount)
/// <summary>
/// 주문하기
/// </summary>
/// <param name="userID">사용자 ID</param>
/// <param name="isbn">ISBN</param>
/// <param name="amount">수량</param>
/// <returns>주문 ID</returns>
[OperationContract]
int Order(string userID, string isbn, int amount);
#endregion
#region 취소하기 - Cancel(orderID)
/// <summary>
/// 취소하기
/// </summary>
/// <param name="orderID">주문 ID</param>
/// <returns>처리 결과</returns>
[OperationContract]
bool Cancel(int orderID);
#endregion
#region 검색하기 - Search(title)
/// <summary>
/// 검색하기
/// </summary>
/// <param name="title">제목</param>
/// <returns>제목 배열</returns>
[OperationContract]
string[] Search(string title);
#endregion
}
/// <summary>
/// 상점 2 인터페이스
/// </summary>
[ServiceContract(Namespace="http://company.com/bookstore2")]
public interface IBookStore2 : IBookStore
{
//////////////////////////////////////////////////////////////////////////////////////////////////// Method
#region 검색하기 2 - Search2(title)
/// <summary>
/// 검색하기 2
/// </summary>
/// <param name="title">제목</param>
/// <returns>제목 배열</returns>
[OperationContract]
string[] Search2(string title);
#endregion
}
}
728x90
그리드형(광고전용)
'C# > WCF' 카테고리의 다른 글
[C#/WCF] 클라이언트/서버 만들기 - WSHttpBinding 사용하기 (0) | 2015.11.09 |
---|---|
[C#/WCF] OperationContractAttribute 클래스 : Action 및 ReplayAction 속성 사용하기 (0) | 2015.11.09 |
[C#/WCF] ServiceMetadataBehavior 클래스 : HttpGetEnabled 속성을 사용해 HTTP GET으로 WSDL 제공하기 (0) | 2015.11.09 |
[C#/WCF] 계약 상속을 통한 버전 관리 사용하기 (0) | 2015.11.09 |
[C#/WCF] 서비스 계약 구현 상속 사용하기 (0) | 2015.11.08 |
[C#/WCF] MessageParameterAttribute 클래스 사용하기 (0) | 2015.11.04 |
[C#/WCF] 계약에 대한 별칭 사용하기 (0) | 2015.11.04 |
[C#/WCF] 클래스 계약 사용하기 (0) | 2015.11.03 |
[C#/WCF] ServiceContractAttribute 클래스 사용하기 (0) | 2015.11.03 |
[C#/WCF] ServiceMetadataBehavior 클래스 : HttpGetEnabled 속성을 사용해 HTTP GET으로 WSDL 제공하기 (0) | 2015.11.03 |