BasicHttpBinding.CreateBindingElements Method
Definition
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.
Creates and returns an ordered collection of binding elements contained in the current binding.
public:
override System::ServiceModel::Channels::BindingElementCollection ^ CreateBindingElements();
public override System.ServiceModel.Channels.BindingElementCollection CreateBindingElements ();
override this.CreateBindingElements : unit -> System.ServiceModel.Channels.BindingElementCollection
Public Overrides Function CreateBindingElements () As BindingElementCollection
Returns
The BindingElementCollection that contains the ordered stack of binding elements described by the BasicHttpBinding.
Examples
The following example creates an ordered collection of the binding elements in the current binding.
BasicHttpBinding binding = new BasicHttpBinding();
binding.Name = "binding1";
binding.Namespace = "http:\\My.ServiceModel.Samples";
BindingElementCollection elements = binding.CreateBindingElements();
Remarks
The order of the binding elements is important. It reflects the order in which the protocol and transport channels are constructed and stacked. This collection of binding elements is a new collection and can be modified and then used to create a CustomBinding.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈