Represents the description of a contract operation that provides a description of the messages that make up the operation.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
A Windows Communication Foundation (WCF) contract is a collection of operations that specifies what the endpoint communicates to the outside world. Each operation is a message exchange. For example, a request message and an associated reply message forming a request/reply message exchange.
A ContractDescription object is used to describe contracts and their operations. Within a ContractDescription, each contract operation has a corresponding that describes aspects of the operation, such as whether the operation is one-way or request/reply. Each also describes the messages that make up the operation using a collection of MessageDescription objects. ContractDescription contains a reference to an interface that defines the contract using the programming model. This interface is marked with ServiceContractAttribute, and its methods that correspond to endpoint operations are marked with OperationContractAttribute.
The following example uses the returned from the collection returned by the Operations property of the ContractDescription class. The code iterates through the collection of endpoints and prints each endpoint name, as well as the name of each operation in the endpoint.
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.