IChannel.ChannelName 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
채널 이름을 가져옵니다.
public:
property System::String ^ ChannelName { System::String ^ get(); };
public string ChannelName { get; }
public string ChannelName { [System.Security.SecurityCritical] get; }
member this.ChannelName : string
[<get: System.Security.SecurityCritical>]
member this.ChannelName : string
Public ReadOnly Property ChannelName As String
속성 값
채널 이름입니다.
- 특성
예외
직접 실행 호출자에 인프라 권한이 없는 경우
예제
int myPort = 8085;
// Creating the 'IDictionary' to set the server object properties.
IDictionary^ myDictionary = gcnew Hashtable;
myDictionary[ "name" ] = "MyServerChannel1";
myDictionary[ "priority" ] = 2;
myDictionary[ "port" ] = 8085;
// Set the properties along with the constructor.
HttpServerChannel^ myHttpServerChannel = gcnew HttpServerChannel( myDictionary,gcnew BinaryServerFormatterSinkProvider );
// Register the server channel.
ChannelServices::RegisterChannel( myHttpServerChannel );
RemotingConfiguration::RegisterWellKnownServiceType( MyHelloServer::typeid, "SayHello", WellKnownObjectMode::SingleCall );
myHttpServerChannel->WantsToListen = true;
// Start listening on a specific port.
myHttpServerChannel->StartListening( myPort );
// Get the name of the channel.
Console::WriteLine( "ChannelName : {0}", myHttpServerChannel->ChannelName );
// Get the channel priority.
Console::WriteLine( "ChannelPriority : {0}", myHttpServerChannel->ChannelPriority );
// Get the schema of the channel.
Console::WriteLine( "ChannelScheme : {0}", myHttpServerChannel->ChannelScheme );
// Get the channel URI.
Console::WriteLine( "GetChannelUri : {0}", myHttpServerChannel->GetChannelUri() );
// Indicates whether 'IChannelReceiverHook' wants to be hooked into the outside listener service.
Console::WriteLine( "WantsToListen : {0}", myHttpServerChannel->WantsToListen );
int myPort = 8085;
// Creating the 'IDictionary' to set the server object properties.
IDictionary myDictionary = new Hashtable();
myDictionary["name"] = "MyServerChannel1";
myDictionary["priority"] = 2;
myDictionary["port"] = 8085;
// Set the properties along with the constructor.
HttpServerChannel myHttpServerChannel = new HttpServerChannel(myDictionary,
new BinaryServerFormatterSinkProvider());
// Register the server channel.
ChannelServices.RegisterChannel(myHttpServerChannel);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyHelloServer),
"SayHello", WellKnownObjectMode.SingleCall);
myHttpServerChannel.WantsToListen = true;
// Start listening on a specific port.
myHttpServerChannel.StartListening((object)myPort);
// Get the name of the channel.
Console.WriteLine("ChannelName : " + myHttpServerChannel.ChannelName);
// Get the channel priority.
Console.WriteLine("ChannelPriority : " + myHttpServerChannel.ChannelPriority);
// Get the schema of the channel.
Console.WriteLine("ChannelScheme : " + myHttpServerChannel.ChannelScheme);
// Get the channel URI.
Console.WriteLine("GetChannelUri : " + myHttpServerChannel.GetChannelUri());
// Indicates whether 'IChannelReceiverHook' wants to be hooked into the outside listener service.
Console.WriteLine("WantsToListen : " + myHttpServerChannel.WantsToListen);
Dim myPort As Integer = 8085
' Creating the 'IDictionary' to set the server object properties.
Dim myDictionary As New Hashtable()
myDictionary("name") = "MyServerChannel1"
myDictionary("priority") = 2
myDictionary("port") = 8085
' Set the properties along with the constructor.
Dim myHttpServerChannel As New HttpServerChannel(myDictionary, _
New BinaryServerFormatterSinkProvider())
' Register the server channel.
ChannelServices.RegisterChannel(myHttpServerChannel)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(MyHelloServer), _
"SayHello", WellKnownObjectMode.SingleCall)
myHttpServerChannel.WantsToListen = true
' Start listening on a specific port.
myHttpServerChannel.StartListening(CType(myPort, Object))
' Get the name of the channel.
Console.WriteLine("ChannelName : " + myHttpServerChannel.ChannelName)
' Get the channel priority.
Console.WriteLine("ChannelPriority : " + myHttpServerChannel.ChannelPriority.ToString())
' Get the schema of the channel.
Console.WriteLine("ChannelScheme : " + myHttpServerChannel.ChannelScheme)
' Get the channel URI.
Console.WriteLine("GetChannelUri : " + myHttpServerChannel.GetChannelUri())
' Indicates whether 'IChannelReceiverHook' wants to be hooked into the outside listener service.
Console.WriteLine("WantsToListen : " + myHttpServerChannel.WantsToListen.ToString())
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET