Condividi tramite


IpcServerChannel Costruttori

Definizione

Inizializza una nuova istanza della classe IpcServerChannel.

Overload

Nome Descrizione
IpcServerChannel(String)

Inizializza una nuova istanza della IpcServerChannel classe con il nome della porta IPC specificato.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inizializza una nuova istanza della IpcServerChannel classe con le proprietà e il sink del canale specificati.

IpcServerChannel(String, String)

Inizializza una nuova istanza della IpcServerChannel classe con il nome del canale e il nome della porta IPC specificati.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inizializza una nuova istanza della IpcServerChannel classe con le proprietà del canale, il sink e il descrittore di sicurezza specificati.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inizializza una nuova istanza della IpcServerChannel classe con il nome del canale, il nome della porta IPC e il sink specificati.

IpcServerChannel(String)

Inizializza una nuova istanza della IpcServerChannel classe con il nome della porta IPC specificato.

public:
 IpcServerChannel(System::String ^ portName);
public IpcServerChannel(string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (portName As String)

Parametri

portName
String

Nome della porta IPC da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// Create and register an IPC channel
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( L"remote" );
ChannelServices::RegisterChannel( serverChannel );
// Create and register an IPC channel
IpcServerChannel serverChannel = new IpcServerChannel("remote");
ChannelServices.RegisterChannel(serverChannel);

Si applica a

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inizializza una nuova istanza della IpcServerChannel classe con le proprietà e il sink del canale specificati.

public:
 IpcServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public IpcServerChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider)

Parametri

properties
IDictionary

Raccolta IDictionary che specifica i valori per le proprietà di configurazione da utilizzare dal canale.

sinkProvider
IServerChannelSinkProvider

Implementazione IServerChannelSinkProvider da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// Create the server channel.
System::Collections::IDictionary^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"name" ] = L"ipc";
properties->default[ L"priority" ] = L"20";
properties->default[ L"portName" ] = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( properties, nullptr );
// Create the server channel.
System.Collections.IDictionary properties =
    new System.Collections.Hashtable();
properties["name"] = "ipc";
properties["priority"] = "20";
properties["portName"] = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(properties, null);

Commenti

Per altre informazioni sulle proprietà di configurazione del canale, vedere Proprietà di configurazione del canale e del formattatore.

Se non è necessaria la funzionalità sink, impostare il sinkProvider parametro su null.

Attenzione

Quando si imposta la exclusiveAddressUse proprietà su false nell'argomento properties , è possibile registrare diversi IpcServerChannel oggetti per la stessa named pipe. In questo caso, le richieste possono passare a uno qualsiasi dei canali registrati. Questa impostazione viene considerata sicura solo se vengono usate anche le schede di controllo di accesso.

Vedi anche

Si applica a

IpcServerChannel(String, String)

Inizializza una nuova istanza della IpcServerChannel classe con il nome del canale e il nome della porta IPC specificati.

public:
 IpcServerChannel(System::String ^ name, System::String ^ portName);
public IpcServerChannel(string name, string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string * string -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (name As String, portName As String)

Parametri

name
String

Nome del canale.

portName
String

Nome della porta IPC da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName);

Commenti

Questo costruttore imposta la ChannelName proprietà utilizzando il name parametro . Se si desidera registrare più canali, ogni canale deve avere un nome univoco.

Si applica a

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inizializza una nuova istanza della IpcServerChannel classe con le proprietà del canale, il sink e il descrittore di sicurezza specificati.

public:
 IpcServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider, System::Security::AccessControl::CommonSecurityDescriptor ^ securityDescriptor);
public IpcServerChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider, System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider * System.Security.AccessControl.CommonSecurityDescriptor -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider, securityDescriptor As CommonSecurityDescriptor)

Parametri

properties
IDictionary

Raccolta IDictionary che specifica i valori per le proprietà di configurazione da utilizzare dal canale.

sinkProvider
IServerChannelSinkProvider

Implementazione IServerChannelSinkProvider da usare dal canale.

securityDescriptor
CommonSecurityDescriptor

Oggetto CommonSecurityDescriptor da utilizzare dal canale.

Commenti

Per altre informazioni sulle proprietà di configurazione del canale, vedere Proprietà di configurazione del canale e del formattatore.

Se non è necessaria la funzionalità sink, impostare il sinkProvider parametro su null. Se non è necessario un descrittore di sicurezza, impostare il securityDescriptor parametro su null.

Attenzione

Quando si imposta la exclusiveAddressUse proprietà su false nell'argomento properties , è possibile registrare diversi IpcServerChannel oggetti per la stessa named pipe. In questo caso, le richieste possono passare a uno qualsiasi dei canali registrati. Questa impostazione viene considerata sicura solo se vengono usate anche le schede di controllo di accesso.

Vedi anche

Si applica a

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inizializza una nuova istanza della IpcServerChannel classe con il nome del canale, il nome della porta IPC e il sink specificati.

public:
 IpcServerChannel(System::String ^ name, System::String ^ portName, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public IpcServerChannel(string name, string portName, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string * string * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (name As String, portName As String, sinkProvider As IServerChannelSinkProvider)

Parametri

name
String

Nome del canale.

portName
String

Nome della porta IPC da usare dal canale.

sinkProvider
IServerChannelSinkProvider

Implementazione IServerChannelSinkProvider da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IServerChannelSinkProvider^ sinkProvider = nullptr;
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName,sinkProvider );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IServerChannelSinkProvider sinkProvider = null;
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName, sinkProvider);

Commenti

Questo costruttore imposta la ChannelName proprietà utilizzando il name parametro . Se si desidera registrare più canali, ogni canale deve avere un nome univoco.

Se non è necessaria la funzionalità sink, impostare il sinkProvider parametro su null.

Si applica a