DeliveryRequirementsAttribute 클래스

정의

바인딩이 서비스 또는 클라이언트 구현에 제공해야 하는 기능 요구 사항을 지정합니다.

public ref class DeliveryRequirementsAttribute sealed : Attribute, System::ServiceModel::Description::IContractBehavior
public ref class DeliveryRequirementsAttribute sealed : Attribute, System::ServiceModel::Description::IContractBehavior, System::ServiceModel::Description::IContractBehaviorAttribute
public sealed class DeliveryRequirementsAttribute : Attribute, System.ServiceModel.Description.IContractBehavior
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true)]
public sealed class DeliveryRequirementsAttribute : Attribute, System.ServiceModel.Description.IContractBehavior, System.ServiceModel.Description.IContractBehaviorAttribute
type DeliveryRequirementsAttribute = class
    inherit Attribute
    interface IContractBehavior
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true)>]
type DeliveryRequirementsAttribute = class
    inherit Attribute
    interface IContractBehavior
    interface IContractBehaviorAttribute
Public NotInheritable Class DeliveryRequirementsAttribute
Inherits Attribute
Implements IContractBehavior
Public NotInheritable Class DeliveryRequirementsAttribute
Inherits Attribute
Implements IContractBehavior, IContractBehaviorAttribute
상속
DeliveryRequirementsAttribute
특성
구현

예제

using System;
using System.ServiceModel;

[ServiceContract]
interface ICalculatorService
{
  [OperationBehavior()]
  int Add(int a, int b);

  [OperationContract]
  int Subtract(int a, int b);
}

[DeliveryRequirementsAttribute(
  QueuedDeliveryRequirements=QueuedDeliveryRequirementsMode.NotAllowed,
  RequireOrderedDelivery=true
)]
class CalculatorService: ICalculatorService
{
  public int Add(int a, int b)
  {
    Console.WriteLine("Add called.");
    return a + b;
  }

  public int Subtract(int a, int b)
  {
    Console.WriteLine("Subtract called.");
    return a - b;
  }

  public int Multiply(int a, int b)
  {
    return a * b;
  }
}
Imports System.ServiceModel

<ServiceContract()> _
Public Interface ICalculatorService

    <OperationBehavior()> _
    Function Add(ByVal a As Integer, ByVal b As Integer) As Integer

    <OperationContract()> _
    Function Subtract(ByVal a As Integer, ByVal b As Integer) As Integer
End Interface

<DeliveryRequirements( _
    QueuedDeliveryRequirements:=QueuedDeliveryRequirementsMode.NotAllowed, _
    RequireOrderedDelivery:=True _
)> _
Class CalculatorService
    Public Function add(ByVal a As Integer, ByVal b As Integer) As Integer
        Console.WriteLine("Add called")
        Return a + b
    End Function

    Public Function Subtract(ByVal a As Integer, ByVal b As Integer) As Integer
        Console.WriteLine("Subtract called.")
        Return a - b
    End Function

    Public Function Multiply(ByVal a As Integer, ByVal b As Integer) As Integer
        Return a * b
    End Function
End Class

설명

사용 하 여는 DeliveryRequirementsAttribute 바인딩에 서비스 또는 클라이언트 구현에 필요한 기능을 확인 하려면 Windows Communication Foundation (WCF) 하도록 지시 합니다. 경우는 DeliveryRequirementsAttribute 서비스 설명을 애플리케이션 구성 파일에서 로드 되거나 코드에서 프로그래밍 방식으로 작성 하는 경우 특성 검색 되 면 WCF 바인딩 구성된의 유효성을 검사 하 고 특성을 지정 하는 모든 기능을 지원 합니다. 예를 들어 사용자의 서비스에서 바인딩이 큐를 지원하도록 요구하는 경우, 사용 하 여 DeliveryRequirementsAttribute 따라 WCF가 다음 요구 사항을 충족 하는지 확인 하려면:

  • QueuedDeliveryRequirements 속성은 바인딩이 충족시켜야 하는 큐 요구 사항을 지정합니다.

  • RequireOrderedDelivery 속성은 바인딩이 순서가 지정된 메시징을 지원해야 하는지 여부를 나타냅니다.

  • TargetContract 속성은 요구 사항이 적용되는 대상 형식을 나타냅니다.

DeliveryRequirementsAttribute 특성이 클래스에 적용되어, 서비스 계약 인터페이스를 원하는 수만큼 구현할 수 있습니다. DeliveryRequirementsAttribute는 클래스가 구현하는 계약 모두에 적용되거나 단 하나에만 적용될 수 있습니다. 이 특성은 클래스에 두 번 이상 적용될 수 있습니다.

생성자

DeliveryRequirementsAttribute()

DeliveryRequirementsAttribute 클래스의 새 인스턴스를 초기화합니다.

속성

QueuedDeliveryRequirements

서비스 바인딩이 대기 중인 계약을 지원해야 하는지 여부를 지정합니다.

RequireOrderedDelivery

바인딩이 순서가 지정된 메시지를 지원해야 하는지 여부를 지정합니다.

TargetContract

특성이 적용될 형식을 가져오거나 설정합니다.

TypeId

파생 클래스에서 구현된 경우 이 Attribute에 대한 고유 식별자를 가져옵니다.

(다음에서 상속됨 Attribute)

메서드

Equals(Object)

이 인스턴스가 지정된 개체와 같은지를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

(다음에서 상속됨 Attribute)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
IsDefaultAttribute()

파생 클래스에서 재정의된 경우 이 인스턴스 값이 파생 클래스에 대한 기본값인지 여부를 표시합니다.

(다음에서 상속됨 Attribute)
Match(Object)

파생 클래스에서 재정의된 경우 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

(다음에서 상속됨 Attribute)
IContractBehavior.AddBindingParameters(ContractDescription, ServiceEndpoint, BindingParameterCollection)

IContractBehavior.AddBindingParameters(ContractDescription, ServiceEndpoint, BindingParameterCollection) 메서드를 구현하여 바인딩 매개 변수를 올바르게 연결합니다.

IContractBehavior.ApplyClientBehavior(ContractDescription, ServiceEndpoint, ClientRuntime)

클라이언트 지원을 위한 IContractBehavior.ApplyClientBehavior(ContractDescription, ServiceEndpoint, ClientRuntime) 메서드 구현입니다.

IContractBehavior.ApplyDispatchBehavior(ContractDescription, ServiceEndpoint, DispatchRuntime)

서비스 지원을 활성화하는 ApplyDispatchBehavior(ContractDescription, ServiceEndpoint, DispatchRuntime) 메서드의 구현입니다.

IContractBehavior.Validate(ContractDescription, ServiceEndpoint)

IContractBehavior.Validate(ContractDescription, ServiceEndpoint) 메서드를 구현하여 유효성 검사 지원을 활성화합니다.

적용 대상