Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPolicyExportExtension::ExportPolicy Method (MetadataExporter^, PolicyConversionContext^)

 

Implement to include for exporting a custom policy assertion about bindings.

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

void ExportPolicy(
	MetadataExporter^ exporter,
	PolicyConversionContext^ context
)

Parameters

exporter
Type: System.ServiceModel.Description::MetadataExporter^

The MetadataExporter that you can use to modify the exporting process.

context
Type: System.ServiceModel.Description::PolicyConversionContext^

The PolicyConversionContext that you can use to insert your custom policy assertion.

Use the GetBindingAssertions, GetMessageBindingAssertions, and GetOperationBindingAssertions methods to obtain collections of policy assertions that have already been exported at various scopes. Then add your IPolicyExportExtension object to the appropriate collection.

The following code example shows the implementation of IPolicyExportExtension on a BindingElement. In this example, a custom binding element is attached to the WSDL file at the binding level.

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

The following code example shows a System.ServiceModel.Configuration::BindingElementExtensionElement implementation that enables the preceding policy exporter to be loaded from an application configuration file.

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

The following example shows the host configuration file that loads the custom policy exporter.

The following example shows the custom assertion in the WSDL file.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft