Επεξεργασία

Κοινή χρήση μέσω


NetNamedPipeBinding Constructors

Definition

Initializes a new instance of the NetNamedPipeBinding class.

Overloads

NetNamedPipeBinding()

Initializes a new instance of the NetNamedPipeBinding class.

NetNamedPipeBinding(NetNamedPipeSecurityMode)

Initializes a new instance of the NetNamedPipeBinding class with a specified security mode.

NetNamedPipeBinding(String)

Initializes a new instance of the NetNamedPipeBinding class with a specified configuration name.

Remarks

The security behavior is configurable using the optional securityMode parameter in the constructor.

NetNamedPipeBinding()

Source:
NetNamedPipeBinding.cs
Source:
NetNamedPipeBinding.cs

Initializes a new instance of the NetNamedPipeBinding class.

public:
 NetNamedPipeBinding();
public NetNamedPipeBinding ();
Public Sub New ()

Examples

The following example shows the part of the configuration file that contains the section for the NetNamedPipeBinding with values set to defaults.

Remarks

The default security mode used is Transport.

Applies to

NetNamedPipeBinding(NetNamedPipeSecurityMode)

Source:
NetNamedPipeBinding.cs
Source:
NetNamedPipeBinding.cs

Initializes a new instance of the NetNamedPipeBinding class with a specified security mode.

public:
 NetNamedPipeBinding(System::ServiceModel::NetNamedPipeSecurityMode securityMode);
public NetNamedPipeBinding (System.ServiceModel.NetNamedPipeSecurityMode securityMode);
new System.ServiceModel.NetNamedPipeBinding : System.ServiceModel.NetNamedPipeSecurityMode -> System.ServiceModel.NetNamedPipeBinding
Public Sub New (securityMode As NetNamedPipeSecurityMode)

Parameters

securityMode
NetNamedPipeSecurityMode

The NetNamedPipeSecurityMode value that specifies whether Windows security is used with named pipes.

Examples

Uri baseAddress = new Uri("http://localhost:8000/uesamples/service");

ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
NetNamedPipeBinding binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);

Remarks

Use this constructor when you want to configure the security explicitly. The default is Transport when using the parameterless constructor.

Applies to

NetNamedPipeBinding(String)

Initializes a new instance of the NetNamedPipeBinding class with a specified configuration name.

public:
 NetNamedPipeBinding(System::String ^ configurationName);
public NetNamedPipeBinding (string configurationName);
new System.ServiceModel.NetNamedPipeBinding : string -> System.ServiceModel.NetNamedPipeBinding
Public Sub New (configurationName As String)

Parameters

configurationName
String

The binding configuration name for the <see href="/dotnet/framework/configure-apps/file-schema/wcf/netnamedpipebinding">netNamedPipeBinding Element</see>.

Examples

Uri baseAddress = new Uri("http://localhost:8000/uesamples/service");

ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);
NetNamedPipeBinding binding = new NetNamedPipeBinding("CalcConfig");

Remarks

Use this constructor when you want to initialize the binding settings from configuration.

Applies to