This documentation is archived and is not being maintained.

DeliveryRequirementsAttribute.QueuedDeliveryRequirements Property

Specifies whether the binding for a service must support queued contracts.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public QueuedDeliveryRequirementsMode QueuedDeliveryRequirements { get; set; }

ExceptionCondition
ArgumentException

The value is not one of the QueuedDeliveryRequirementsMode values.

The Required instructs WCF to confirm that the binding supports queued delivery. The NotAllowed value instructs WCF to confirm that the binding does not support queued delivery.

The following code example uses the DeliveryRequirementsAttribute attribute to instruct WCF to confirm at runtime that the actual binding does not support queued contracts but does support ordered messages.

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;
  }
}

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: