ChannelServices.GetChannel(String) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen ada sahip kayıtlı bir kanal döndürür.
public:
static System::Runtime::Remoting::Channels::IChannel ^ GetChannel(System::String ^ name);
public static System.Runtime.Remoting.Channels.IChannel GetChannel (string name);
[System.Security.SecurityCritical]
public static System.Runtime.Remoting.Channels.IChannel GetChannel (string name);
static member GetChannel : string -> System.Runtime.Remoting.Channels.IChannel
[<System.Security.SecurityCritical>]
static member GetChannel : string -> System.Runtime.Remoting.Channels.IChannel
Public Shared Function GetChannel (name As String) As IChannel
Parametreler
- name
- String
Kanal adı.
Döndürülenler
Kayıtlı kanal arabirimi veya null
kanal kayıtlı değilse.
- Öznitelikler
Özel durumlar
Hemen çağıranın altyapı izni yok.
Örnekler
HttpChannel^ myClientChannel = gcnew HttpChannel( myProperties,gcnew SoapClientFormatterSinkProvider,gcnew SoapServerFormatterSinkProvider );
ChannelServices::RegisterChannel( myClientChannel, false );
// Get the registered channel.
Console::WriteLine( "Channel Name : {0}", ChannelServices::GetChannel( myClientChannel->ChannelName )->ChannelName );
Console::WriteLine( "Channel Priorty : {0}", ChannelServices::GetChannel( myClientChannel->ChannelName )->ChannelPriority );
HttpChannel myClientChannel = new HttpChannel(myProperties,
new SoapClientFormatterSinkProvider(),
new SoapServerFormatterSinkProvider());
ChannelServices.RegisterChannel(myClientChannel);
// Get the registered channel.
Console.WriteLine("Channel Name : "+ChannelServices.GetChannel(
myClientChannel.ChannelName).ChannelName);
Console.WriteLine("Channel Priorty : "+ChannelServices.GetChannel(
myClientChannel.ChannelName).ChannelPriority);
Dim myClientChannel As New HttpChannel(myProperties, New SoapClientFormatterSinkProvider(), _
New SoapServerFormatterSinkProvider())
ChannelServices.RegisterChannel(myClientChannel)
' Get the registered channel.
Console.WriteLine("Channel Name : " + ChannelServices.GetChannel _
(myClientChannel.ChannelName).ChannelName)
Console.WriteLine("Channel Priorty : " + _
ChannelServices.GetChannel(myClientChannel.ChannelName).ChannelPriority.ToString())