Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

OperationDescription Class

Represents the description of a contract operation that provides a description of the messages that make up the operation.

System.Object
  System.ServiceModel.Description.OperationDescription

Namespace:  System.ServiceModel.Description
Assemblies:   System.ServiceModel (in System.ServiceModel.dll)
  System.ServiceModel.Primitives (in System.ServiceModel.Primitives.dll)

[<DebuggerDisplayAttribute("Name={name}, IsInitiating={isInitiating}, IsTerminating={isTerminating}")>]
type OperationDescription =  class end

The OperationDescription type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibraryOperationDescriptionInitializes a new instance of the OperationDescription class with a specified name and contract description.
Top

  NameDescription
Public propertySupported by Portable Class LibraryBeginMethodGets or sets the begin method of the operation.
Public propertyBehaviorsGets or sets the operation behaviors associated with the operation.
Public propertySupported by Portable Class LibraryDeclaringContractGets or sets the contract to which the operation belongs.
Public propertySupported by Portable Class LibraryEndMethodGets or sets the end method of the operation.
Public propertySupported by Portable Class LibraryFaultsGets the descriptions of the faults associated with the operation description.
Public propertyHasProtectionLevelGets a value that indicates whether the operation has had a protection level set.
Public propertyIsInitiatingGets or sets a value that indicates whether the method implements an operation that can initiate a session on the server (if such a session exists).
Public propertySupported by Portable Class LibraryIsOneWayGets or sets a value that indicates whether an operation returns a reply message.
Public propertyIsTerminatingGets or sets a value that indicates whether the service operation causes the server to close the session after the reply message, if any, is sent.
Public propertySupported by Portable Class LibraryKnownTypesGets the known types associated with the operation description.
Public propertySupported by Portable Class LibraryMessagesGets or sets the descriptions of the messages that make up the operation.
Public propertySupported by Portable Class LibraryNameGets or sets the name of the operation description.
Public propertyOperationBehaviorsGets the set of behaviors for the operation.
Public propertyProtectionLevelGets or sets the protection level for the operation.
Public propertySupported by Portable Class LibrarySyncMethodGets or sets the service synchronization method of the operation description.
Public propertyTaskMethodGets or sets the method used for the task operation.
Top

  NameDescription
Public methodSupported by Portable Class LibraryEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodShouldSerializeProtectionLevelReturns a value that indicates whether the ProtectionLevel property has changed from its default value and should be serialized.
Public methodSupported by Portable Class LibraryToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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 OperationDescription that describes aspects of the operation, such as whether the operation is one-way or request/reply. Each OperationDescription 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.

Many of the properties on OperationDescription have corresponding properties in the WCF programming model on OperationContractAttribute, for example, IsTerminating.

The following example uses the OperationDescription 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.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft