Exports a custom policy assertion that represents the one-way binding element.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
void IPolicyExportExtension.ExportPolicy( MetadataExporter exporter, PolicyConversionContext context )
- Type: System.ServiceModel.Description.MetadataExporter
The MetadataExporter that you can use to modify the exporting process.
- Type: System.ServiceModel.Description.PolicyConversionContext
The PolicyConversionContext that you can use to insert your custom policy assertion.
This method writes binding-related statements into the WSDL information exposed by a particular contract and is used by WCF to communicate to clients the existence of this custom binding element in the binding stack.
This method takes two parameters: the MetadataExporter and PolicyConversionContext objects. Use the GetBindingAssertions, GetMessageBindingAssertions, and GetOperationBindingAssertions methods to obtain collections of policy assertions that have already been exported at various scopes. Then use this method to add your own policy assertions to the appropriate collection.
The Contract property exposes the ContractDescription for the endpoint that is being exported. This enables this method to correctly scope their exported policy assertions. For example, security attributes in code can add behaviors to the ContractDescription that indicate where security policy assertions should be added.
Once custom policy assertions are attached to the WSDL information, clients can detect and import the custom binding assertions by implementing an IPolicyImportExtension interface.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.