IPolicyExportExtension::ExportPolicy Method (MetadataExporter^, PolicyConversionContext^)
Implement to include for exporting a custom policy assertion about bindings.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
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.
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.
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.
Available since 3.0