IpcServerChannel Konstruktory
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Inicializuje novou instanci IpcServerChannel třídy.
Přetížení
| Name | Description |
|---|---|
| IpcServerChannel(String) |
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem portu IPC. |
| IpcServerChannel(IDictionary, IServerChannelSinkProvider) |
Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu a jímkou. |
| IpcServerChannel(String, String) |
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu a názvem portu IPC. |
| IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor) |
Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu, jímkou a popisovačem zabezpečení. |
| IpcServerChannel(String, String, IServerChannelSinkProvider) |
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu, názvem portu IPC a jímkou. |
IpcServerChannel(String)
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem portu IPC.
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)
Parametry
- portName
- String
Název portu IPC, který má kanál používat.
Příklady
Následující příklad kódu ukazuje, jak použít tento konstruktor.
// 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);
Platí pro
IpcServerChannel(IDictionary, IServerChannelSinkProvider)
Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu a jímkou.
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)
Parametry
- properties
- IDictionary
Kolekce IDictionary , která určuje hodnoty vlastností konfigurace, které má kanál používat.
- sinkProvider
- IServerChannelSinkProvider
Implementace IServerChannelSinkProvider , kterou má kanál používat.
Příklady
Následující příklad kódu ukazuje, jak použít tento konstruktor.
// 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);
Poznámky
Další informace o vlastnostech konfigurace kanálu naleznete v tématu Channel and Formatter Configuration Properties.
Pokud nevyžadujete funkčnost jímky, nastavte sinkProvider parametr na nullhodnotu .
Upozornění
Při nastavování exclusiveAddressUse vlastnosti v false argumentu properties lze pro stejný pojmenovaný kanál zaregistrovat několik IpcServerChannel objektů. V takovém případě můžou žádosti přejít na některý z registrovaných kanálů. Toto nastavení je považováno za bezpečné pouze v případě, že se používají také alcs.
Viz také
Platí pro
IpcServerChannel(String, String)
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu a názvem portu IPC.
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)
Parametry
- name
- String
Název kanálu.
- portName
- String
Název portu IPC, který má kanál používat.
Příklady
Následující příklad kódu ukazuje, jak použít tento konstruktor.
// 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);
Poznámky
Tento konstruktor nastaví ChannelName vlastnost pomocí parametru name . Pokud chcete zaregistrovat více než jeden kanál, musí mít každý kanál jedinečný název.
Platí pro
IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)
Inicializuje novou instanci IpcServerChannel třídy se zadanými vlastnostmi kanálu, jímkou a popisovačem zabezpečení.
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)
Parametry
- properties
- IDictionary
Kolekce IDictionary , která určuje hodnoty vlastností konfigurace, které má kanál používat.
- sinkProvider
- IServerChannelSinkProvider
Implementace IServerChannelSinkProvider , kterou má kanál používat.
- securityDescriptor
- CommonSecurityDescriptor
A CommonSecurityDescriptor , kterou má kanál používat.
Poznámky
Další informace o vlastnostech konfigurace kanálu naleznete v tématu Channel and Formatter Configuration Properties.
Pokud nevyžadujete funkčnost jímky, nastavte sinkProvider parametr na nullhodnotu . Pokud nepotřebujete popisovač zabezpečení, nastavte securityDescriptor parametr na nullhodnotu .
Upozornění
Při nastavování exclusiveAddressUse vlastnosti v false argumentu properties lze pro stejný pojmenovaný kanál zaregistrovat několik IpcServerChannel objektů. V takovém případě můžou žádosti přejít na některý z registrovaných kanálů. Toto nastavení je považováno za bezpečné pouze v případě, že se používají také alcs.
Viz také
Platí pro
IpcServerChannel(String, String, IServerChannelSinkProvider)
Inicializuje novou instanci IpcServerChannel třídy se zadaným názvem kanálu, názvem portu IPC a jímkou.
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)
Parametry
- name
- String
Název kanálu.
- portName
- String
Název portu IPC, který má kanál používat.
- sinkProvider
- IServerChannelSinkProvider
Implementace IServerChannelSinkProvider , kterou má kanál používat.
Příklady
Následující příklad kódu ukazuje, jak použít tento konstruktor.
// 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);
Poznámky
Tento konstruktor nastaví ChannelName vlastnost pomocí parametru name . Pokud chcete zaregistrovat více než jeden kanál, musí mít každý kanál jedinečný název.
Pokud nevyžadujete funkčnost jímky, nastavte sinkProvider parametr na nullhodnotu .