Condividi tramite


HttpServerChannel Costruttori

Definizione

Inizializza una nuova istanza della classe HttpServerChannel.

Overload

Nome Descrizione
HttpServerChannel()

Inizializza una nuova istanza della classe HttpServerChannel.

HttpServerChannel(Int32)

Inizializza una nuova istanza della HttpServerChannel classe in ascolto sulla porta specificata.

HttpServerChannel(IDictionary, IServerChannelSinkProvider)

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

HttpServerChannel(String, Int32)

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

HttpServerChannel(String, Int32, IServerChannelSinkProvider)

Inizializza una nuova istanza della HttpServerChannel classe nella porta specificata con il nome specificato, che rimane in ascolto sulla porta specificata e usa 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 HttpServerChannel classe in ascolto 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 in 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 HttpServerChannel classe con le proprietà e il sink 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

Oggetto IServerChannelSinkProvider da utilizzare con la nuova istanza di HttpServerChannel.

Eccezioni

Una proprietà di configurazione non è stata formattata correttamente.

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 del canale e del 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 HttpServerChannel classe con il nome specificato e in ascolto 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 in 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à utilizzando il name parametro . Se si desidera registrare più canali, 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 HttpServerChannel classe nella porta specificata con il nome specificato, che rimane in ascolto sulla porta specificata e usa 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 in cui il canale è in ascolto.

sinkProvider
IServerChannelSinkProvider

Oggetto IServerChannelSinkProvider da utilizzare 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à utilizzando 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