Click or drag to resize

ServiceCreateServiceBinding Method

Creates a Binding based on the specified address.

Namespace: GSF.ServiceModel
Assembly: GSF.ServiceModel (in GSF.ServiceModel.dll) Version: 2.4.207-beta
Syntax
public static Binding CreateServiceBinding(
	ref string address,
	bool enableSecurity
)
View Source

Parameters

address  String
The URI that is used to determine the type of Binding to be created.
enableSecurity  Boolean
A boolean value that indicated whether security is to be enabled on the Binding.

Return Value

Binding
An Binding object if a valid address is specified; otherwise null.
Remarks
This list shows all valid address schemes that can be specified in the address:
Address SchemeUsage
http:// or http.soap11://An address of http.soap11://localhost:2929 will create an BasicHttpBinding and update the address to http://localhost:2929.
http.soap12://An address of http.soap12://localhost:2929 will create an WSHttpBinding and update the address to http://localhost:2929.
http.duplex://An address of http.duplex://localhost:2929 will create an WSDualHttpBinding and update the address to http://localhost:2929.
http.rest://An address of http.rest://localhost:2929 will create an WebHttpBinding and update the address to http://localhost:2929.
net.tcp://An address of net.tcp://localhost:2929 will create an NetTcpBinding and leave the address unchanged.
net.p2p://An address of net.p2p://localhost:2929 will create an NetPeerTcpBinding and leave the address unchanged.
net.pipe://An address of net.pipe://localhost:2929 will create an NetNamedPipeBinding and leave the address unchanged.
net.msmq://An address of net.msmq://localhost:2929 will create an NetMsmqBinding and leave the address unchanged.

The enableSecurity parameter value is ignored Mono deployments since security bindings are not implemented.

See Also