HttpServerChannel Costruttori

Definizione

Inizializza una nuova istanza della classe HttpServerChannel.

Overload

HttpServerChannel()

Inizializza una nuova istanza della classe HttpServerChannel.

HttpServerChannel(Int32)

Inizializza una nuova istanza della classe HttpServerChannel che è in attesa sulla porta specificata.

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

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

HttpServerChannel(String, Int32)

Inizializza una nuova istanza della classe HttpServerChannel con il nome specificato e in attesa sulla porta specificata.

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Inizializza una nuova istanza della classe HttpServerChannel nella porta specificata con il nome indicato, che è in attesa sulla porta specificata e utilizza il sink specificato.

HttpServerChannel()

Inizializza una nuova istanza della classe HttpServerChannel.

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

Si applica a

HttpServerChannel(Int32)

Inizializza una nuova istanza della classe HttpServerChannel che è in attesa sulla porta specificata.

public:
 HttpServerChannel(int port);
public HttpServerChannel (int port);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : int -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (port As Integer)

Parametri

port
Int32

Porta su cui il canale è in ascolto.

Commenti

Per richiedere l'assegnazione dinamica di una porta disponibile, impostare il port parametro su 0 (zero).

Si applica a

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

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

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

Parametri

properties
IDictionary

Oggetto IDictionary delle proprietà del canale che contengono le informazioni di configurazione per il canale corrente.

sinkProvider
IServerChannelSinkProvider

IServerChannelSinkProvider da utilizzare con la nuova istanza di HttpServerChannel.

Eccezioni

Il formato di una proprietà di configurazione non è corretto.

Esempio

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

System::Collections::Hashtable^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"port" ] = 9090;
IServerChannelSinkProvider^ sinkProvider = nullptr;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel( properties,sinkProvider );
System.Collections.Hashtable properties =
    new System.Collections.Hashtable();
properties["port"] = 9090;
IServerChannelSinkProvider sinkProvider = null;
HttpServerChannel serverChannel = new HttpServerChannel(
    properties, sinkProvider);

Commenti

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

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

Vedi anche

Si applica a

HttpServerChannel(String, Int32)

Inizializza una nuova istanza della classe HttpServerChannel con il nome specificato e in attesa sulla porta specificata.

public:
 HttpServerChannel(System::String ^ name, int port);
public HttpServerChannel (string name, int port);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : string * int -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (name As String, port As Integer)

Parametri

name
String

Nome del canale.

port
Int32

Porta su cui il canale è in ascolto.

Esempio

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

String^ name = L"RemotingServer";
int port = 9090;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel( name,port );
string name = "RemotingServer";
int port = 9090;
HttpServerChannel serverChannel =
    new HttpServerChannel(name, port);

Commenti

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

Per richiedere l'assegnazione dinamica di una porta disponibile, impostare il port parametro su 0 (zero).

Si applica a

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Inizializza una nuova istanza della classe HttpServerChannel nella porta specificata con il nome indicato, che è in attesa sulla porta specificata e utilizza il sink specificato.

public:
 HttpServerChannel(System::String ^ name, int port, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider);
public HttpServerChannel (string name, int port, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Http.HttpServerChannel : string * int * System.Runtime.Remoting.Channels.IServerChannelSinkProvider -> System.Runtime.Remoting.Channels.Http.HttpServerChannel
Public Sub New (name As String, port As Integer, sinkProvider As IServerChannelSinkProvider)

Parametri

name
String

Nome del canale.

port
Int32

Porta su cui il canale è in ascolto.

sinkProvider
IServerChannelSinkProvider

Oggetto IServerChannelSinkProvider che verrà utilizzato dal canale.

Esempio

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

String^ name = L"RemotingServer";
int port = 9090;
IServerChannelSinkProvider^ sinkProvider = nullptr;
HttpServerChannel^ serverChannel = gcnew HttpServerChannel(
   name,port,sinkProvider );
string name = "RemotingServer";
int port = 9090;
IServerChannelSinkProvider sinkProvider = null;
HttpServerChannel serverChannel =
    new HttpServerChannel(name, port, sinkProvider);

Commenti

Questo costruttore imposta la ChannelName proprietà usando il name parametro .

Per richiedere l'assegnazione dinamica di una porta disponibile, impostare il port parametro su 0 (zero).

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

Si applica a