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)

public sealed class ComContractElement : ConfigurationElement
public final class ComContractElement extends ConfigurationElement
public final class ComContractElement extends ConfigurationElement
Not applicable.

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft