ConnectionOrientedTransportBindingElement.IPolicyExportExtension.ExportPolicy Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exports a custom policy assertion about bindings.
virtual void System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy(System::ServiceModel::Description::MetadataExporter ^ exporter, System::ServiceModel::Description::PolicyConversionContext ^ context) = System::ServiceModel::Description::IPolicyExportExtension::ExportPolicy;
void IPolicyExportExtension.ExportPolicy (System.ServiceModel.Description.MetadataExporter exporter, System.ServiceModel.Description.PolicyConversionContext context);
abstract member System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy : System.ServiceModel.Description.MetadataExporter * System.ServiceModel.Description.PolicyConversionContext -> unit
override this.System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy : System.ServiceModel.Description.MetadataExporter * System.ServiceModel.Description.PolicyConversionContext -> unit
Sub ExportPolicy (exporter As MetadataExporter, context As PolicyConversionContext) Implements IPolicyExportExtension.ExportPolicy
- exporter
- MetadataExporter
The MetadataExporter that you can use to modify the exporting process.
- context
- PolicyConversionContext
The PolicyConversionContext that you can use to insert your custom policy assertion.
exporter
or context
is null
.
This method writes binding-related statements into the WSDL information exposed by a particular contract and is used by Windows Communication Foundation (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 allows this method to correctly scope their exported policy assertions. For example, security attributes in code may add behaviors to the ContractDescription that indicate where security policy assertions should be added.
Once custom policy assertions have been attached to the WSDL information, clients can detect and import the custom binding assertions by implementing an IPolicyImportExtension interface.
Продукт | Версии |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: