IBindingDeliveryCapabilities インターフェイス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
クライアントとサービスが必要とする可能性のある機能を記述およびアドバタイズするためにバインディングが実装する必要があるインターフェイスを定義します。
public interface class IBindingDeliveryCapabilities
public interface IBindingDeliveryCapabilities
type IBindingDeliveryCapabilities = interface
Public Interface IBindingDeliveryCapabilities
例
次の例では、 CalculatorService が順序付けられたメッセージ配信で WSHttpBinding を使用する必要があります。 このバインディングでは、信頼できるセッションとキューへの配信は既定では使用されませんが、有効にできます。
<!-- Here is the configuration for a CalculatorService using a WSHttpBinding with ordered message delivery required. -->
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service
type="Microsoft.ServiceModel.Samples.CalculatorService">
<!-- Use base address provided by host and a WSHttpBinding named "Binding1" -->
<endpoint address=""
binding="wsHttpBinding"
bindingConfiguration="Binding1"
contract="Microsoft.ServiceModel.Samples.ICalculator" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="Binding1">
<!-- The next element enables a ReliableSession and required ordered delivery-->
<reliableSession enabled="true" ordered="true"/>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
// The CalculatorService configuration has enabled a reliable session
// with ordered delivery set to true. This means that the binding
// requirement for ordered delivery specified by the
// BindingRequirementsAttribute on the CalculatorService class
// implemented below will be satisfied by this WSHttpBinding.
using System;
using System.ServiceModel;
[ServiceContract]
interface ICalculatorService
{
[OperationBehavior()]
int Add(int a, int b);
[OperationContract]
int Subtract(int a, int b);
}
[BindingRequirements(
QueuedDeliveryRequirements=RequirementsMode.Disallow,
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;
}
}
注釈
IBindingDeliveryCapabilities インターフェイスは、クライアントとサービスがコントラクトの一部として、必要な機能がバインディングによって提供されることを規定できる場合は、バインディングによって実装される必要があります。
プロパティ
| 名前 | 説明 |
|---|---|
| AssuresOrderedDelivery |
バインドが送信された順序でメッセージの配信の保証をサポートできるかどうかを示す値を取得します。 |
| QueuedDelivery |
バインディングがメッセージのキュー配信をサポートできるかどうかを示す値を取得します。 |