Export (0) Print
Expand All

ComContractElement Class

Specifies a COM+ integration service contract. This class cannot be inherited.

Namespace:  System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Public NotInheritable Class ComContractElement _
	Inherits ConfigurationElement
'Usage
Dim instance As ComContractElement

COM+ integration service contracts are currently restricted to the “http://tempuri.org” namespace, and the contract name is derived from the supporting COM interface. You can, however, specify alternatives by using the comContracts section in the configuration file.

You can use the following configuration to specify the namespace, contract name, and user defined types to be included. You can also specify other settings for a service contract

<comContracts>
  <comContract contract="{5163B1E7-F0CF-4B6A-9A02-4AB654F34284}"
    name="_Broker" namespace="http://tempuri.org/5163B1E7-F0CF-4B6A-9A02-4AB654F34284"
    requiresSession="true">
    <exposedMethods>
      <add exposedMethod="BuyStock" />
      <add exposedMethod="SellStock" />
      <add exposedMethod="ExecuteTransaction" />
    </exposedMethods>
  </comContract>
</comContracts>

When the service is initialized, the specified namespaces and contract names are applied to the generated service descriptions.

System.Object
  System.Configuration.ConfigurationElement
    System.ServiceModel.Configuration.ComContractElement

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

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.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft