DeliveryRequirementsAttribute::TargetContract Property
.NET Framework (current version)
Gets or sets the type to which it applies.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: property Type^ TargetContract { virtual Type^ get() sealed; virtual void set(Type^ value) sealed; }
A service class can implement any number of service contract interfaces. Use the TargetContract property to validate that endpoints with the TargetContract have bindings that support the requirements. This attribute can be used any number of times on the same class.
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. It also specifies the target contract to which this restriction should be applied.
.NET Framework
Available since 3.0
Available since 3.0
Show: