System.ServiceModel 4.0.0.0 System.Object System.Diagnostics.DebuggerDisplay("Name={name}, Namespace={ns}, ContractType={contractType}")

A indigo2 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 indigo2 contracts and their operations. Within a , each contract operation has a corresponding 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 also describes the messages that make up the operation using a . contains a reference to an interface that defines the contract using the programming model. This interface is marked with and its methods that correspond to endpoint operations are marked with the .

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.

Similar to bindings, each contract has a and that uniquely identify it in the metadata of the service.

Describes a indigo1 contract that specifies what an endpoint communicates to the outside world.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class with a specified name.

  The name of the contract.
- Constructor
  4.0.0.0

  The namespace can be an empty string ("").

  Initializes a new instance of the class with a namespace-qualified name specified.

  The name of the contract.
  The namespace that contains the name of the contract.
- Property
  4.0.0.0
  System.Collections.Generic.KeyedByTypeCollection<System.ServiceModel.Description.IContractBehavior> To be added. To be added.

  Gets the behaviors associated with the contract description.

- Property
  4.0.0.0
  System.Type To be added.

  The property is not serializable, so it is only available when the description is bound to runtime. It cannot be imported or exported as part of the metadata.

  Gets or sets the type of callback contract that the contract description specifies.

- Property
  4.0.0.0
  System.String To be added. To be added.

  Gets or sets the configuration name for the contract description.

- Property
  4.0.0.0
  System.Collections.ObjectModel.KeyedCollection<System.Type,System.ServiceModel.Description.IContractBehavior> To be added. To be added.

  Gets the collection of behavior for the contract.

- Property
  4.0.0.0
  System.Type To be added.

  The property is not serializable, so it is only available when the description is bound to runtime. It cannot be imported or exported as part of the metadata.

  Gets or sets the contract type that the contract description specifies.

- Method
  4.0.0.0
  System.ServiceModel.Description.ContractDescription ``

  The difference between the overloads is that the ones with two arguments allow you to find attributes from the service (for example, ).

  Returns the contract description for a specified type of contract.

  The for the specified type of contract.

  The of contract.
- Method
  4.0.0.0
  System.ServiceModel.Description.ContractDescription `` ``

  The difference between the overloads is that the ones with two arguments allow you to find attributes from the service (for example, ).

  Returns the contract description for a specified type of contract and service implementation.

  The for the specified type of contract and service implementation.

  The of contract. The that implements the service.
- Method
  4.0.0.0
  System.ServiceModel.Description.ContractDescription `` ``

  The difference between the overloads is that the ones with two arguments allow you to find attributes from the service (for example, ).

  Returns the contract description for a specified type of contract and a specified type of service.

  The for the specified type of contract and type of service.

  The of contract. The of service.
- Method
  4.0.0.0
  System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ContractDescription> To be added.

  Returns a collection of contract descriptions that are inherited by the current contract description.

  The of type that is inherited by the current contract description.

- Property
  4.0.0.0
  System.Boolean To be added.

  When the is set, the property is set to true.

  Gets a value that indicates whether the contract has had a protection level set.

- Property
  4.0.0.0
  System.String To be added. To be added.

  Gets or sets the name of the contract.

- Property
  4.0.0.0
  System.String To be added.

  The namespace can be an empty string ("").

  Gets or sets the namespace for the contract.

- Property
  4.0.0.0
  System.ServiceModel.Description.OperationDescriptionCollection To be added. To be added.

  Gets the collection of operation descriptions associated with the contract.

- Property
  4.0.0.0
  System.Net.Security.ProtectionLevel To be added.

  When the is set, the property is set to true.

  Gets or sets the level of security protection associated with the contract.

- Property
  4.0.0.0
  System.ServiceModel.SessionMode To be added.

  A reliable session is a way of correlating a set of messages exchanged between two or more endpoints (using the WS-ReliableMessaging specification) to provide assurances of the reliability of the connection.

  Gets or sets a value that indicates whether a session is required by the contract.