ChannelServices.GetChannel(String) 메서드

정의

지정된 이름의 등록된 채널을 반환합니다.

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

매개 변수

name
String

채널 이름입니다.

반품

등록된 채널에 대한 인터페이스이거나 null 채널이 등록되지 않은 경우

특성

예외

즉시 호출자에게 인프라 권한이 없습니다.

예제

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())

적용 대상