Describes a contract that specifies what an endpoint communicates to the outside world.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Thetype exposes the following members.
|Behaviors||Gets the behaviors associated with the contract description.|
|CallbackContractType||Gets or sets the type of callback contract that the contract description specifies.|
|ConfigurationName||Gets or sets the configuration name for the contract description.|
|ContractType||Gets or sets the contract type that the contract description specifies.|
|HasProtectionLevel||Gets a value that indicates whether the contract has had a protection level set.|
|Name||Gets or sets the name of the contract.|
|Namespace||Gets or sets the namespace for the contract.|
|Operations||Gets the collection of operation descriptions associated with the contract.|
|ProtectionLevel||Gets or sets the level of security protection associated with the contract.|
|SessionMode||Gets or sets a value that indicates whether a session is required by the contract.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetContract(Type)||Returns the contract description for a specified type of contract.|
|GetContract(Type, Object)||Returns the contract description for a specified type of contract and service implementation.|
|GetContract(Type, Type)||Returns the contract description for a specified type of contract and a specified type of service.|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetInheritedContracts||Returns a collection of contract descriptions that are inherited by the current contract description.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ShouldSerializeProtectionLevel||Returns a value that indicates whether the ProtectionLevel property has changed from its default value and should be serialized.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
A 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 form a request/reply message exchange.
A object is used to describe contracts and their operations. Within a , each contract operation has a corresponding OperationDescription that describes aspects of the each operation that is part of the contract, such as whether the operation is one-way or request/reply. Each OperationDescription also describes the messages that make up the operation using a MessageDescriptionCollection. 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 the OperationContractAttribute.
A duplex contract defines the following logical sets of operations:
A set that the service exposes for the client to call.
A set that the client exposes for the service to call.
The programming model for defining a duplex contract is to split each set in a separate interface and apply attributes to each interface. In this case, contains a reference to each of the interfaces that groups them into one duplex contract.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.