ComContractElement::ExposedMethods Property

 

Gets a collection of COM+ methods that are exposed when the interface on a COM+ component is exposed as a Web service.

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

public:
[ConfigurationPropertyAttribute("exposedMethods", Options = ConfigurationPropertyOptions::None)]
property ComMethodElementCollection^ ExposedMethods {
	ComMethodElementCollection^ get();
}

Property Value

Type: System.ServiceModel.Configuration::ComMethodElementCollection^

The collection of COM+ methods that are exposed when the interface on a COM+ component is exposed as a Web service.

The COM+ integration configuration tool (ComSvcConfig.exe) can be used to add specific methods from a COM interface to appear on the generated service contract.

For example, you can use the following command to add the three named methods from the IFinances COM interface on the ItemOrders.Financial component, to the generated service contract.

ComSvcConfig.exe /i /application:OnlineStore /contract:ItemOrders.Financial,IFinances.{TransferFunds,AddFunds,RemoveFunds} /hosting:complus

When you run the ComSvcConfig.exe tool, it then generates the following service contract listing the previously mentioned methods as exposedMethod elements.

At service initialization time, the runtime attempts to generate a service contract by reflecting over and adding only the methods included in the list of exposedMethod elements. A trace is produced for every interface method that is not included on the service contract.

.NET Framework
Available since 3.0
Return to top
Show: