BasicHttpBinding.CreateBindingElements Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns an ordered collection of binding elements contained in the current binding.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Return Value
Type: System.ServiceModel.Channels.BindingElementCollectionThe BindingElementCollection that contains the ordered stack of binding elements described by the BasicHttpBinding.
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 creates a new collection each time it is called and can be modified and then used to create a CustomBinding.
Dim basicEHBinding As New BasicHttpBinding() Dim bindingEC As BindingElementCollection = basicEHBinding.CreateBindingElements() 'Check on binding elements contained in the collection Dim boolHTBE As Boolean = bindingEC.Contains(GetType(HttpTransportBindingElement)) 'Returns true Dim txtboolHTBE As String = boolHTBE.ToString() Dim boolHSTBE As Boolean = bindingEC.Contains(GetType(HttpsTransportBindingElement)) 'Returns false Dim txtboolHSTBE As String = boolHSTBE.ToString()