다음을 통해 공유


IClientChannelSink.ProcessMessage 메서드

정의

현재 싱크에서 메시지 처리를 요청합니다.

public:
 void ProcessMessage(System::Runtime::Remoting::Messaging::IMessage ^ msg, System::Runtime::Remoting::Channels::ITransportHeaders ^ requestHeaders, System::IO::Stream ^ requestStream, [Runtime::InteropServices::Out] System::Runtime::Remoting::Channels::ITransportHeaders ^ % responseHeaders, [Runtime::InteropServices::Out] System::IO::Stream ^ % responseStream);
public void ProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Channels.ITransportHeaders requestHeaders, System.IO.Stream requestStream, out System.Runtime.Remoting.Channels.ITransportHeaders responseHeaders, out System.IO.Stream responseStream);
[System.Security.SecurityCritical]
public void ProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Channels.ITransportHeaders requestHeaders, System.IO.Stream requestStream, out System.Runtime.Remoting.Channels.ITransportHeaders responseHeaders, out System.IO.Stream responseStream);
abstract member ProcessMessage : System.Runtime.Remoting.Messaging.IMessage * System.Runtime.Remoting.Channels.ITransportHeaders * System.IO.Stream * ITransportHeaders * Stream -> unit
[<System.Security.SecurityCritical>]
abstract member ProcessMessage : System.Runtime.Remoting.Messaging.IMessage * System.Runtime.Remoting.Channels.ITransportHeaders * System.IO.Stream * ITransportHeaders * Stream -> unit
Public Sub ProcessMessage (msg As IMessage, requestHeaders As ITransportHeaders, requestStream As Stream, ByRef responseHeaders As ITransportHeaders, ByRef responseStream As Stream)

매개 변수

msg
IMessage

처리할 메시지입니다.

requestHeaders
ITransportHeaders

서버로 보내는 메시지 머리글에 추가할 헤더입니다.

requestStream
Stream

전송 싱크로 향하는 스트림입니다.

responseHeaders
ITransportHeaders

이 메서드가 반환될 때 서버가 반환한 헤더가 들어 있는 ITransportHeaders 인터페이스를 포함합니다. 이 매개 변수는 초기화되지 않은 상태로 전달됩니다.

responseStream
Stream

이 메서드가 반환될 때 전송 싱크에서 되돌아올 Stream을 포함합니다. 이 매개 변수는 초기화되지 않은 상태로 전달됩니다.

특성

예외

직접 실행 호출자에 인프라 권한이 없는 경우

예제

다음 코드 예제에는이 메서드의 구현을 보여 줍니다.

virtual void ProcessMessage( IMessage^ message, ITransportHeaders^ requestHeaders, Stream^ requestStream, [Out]ITransportHeaders^% responseHeaders, [Out]Stream^% responseStream )
{
   // Print the request message properties.
   Console::WriteLine( "---- Message from the client ----" );
   IDictionary^ dictionary = message->Properties;
   IEnumerator^ myEnum = dictionary->Keys->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      Object^ key = safe_cast<Object^>(myEnum->Current);
      Console::WriteLine( "{0} = {1}", key, dictionary[ key ] );
   }

   Console::WriteLine( "---------------------------------" );

   // Hand off to the next sink in the chain.
   nextSink->ProcessMessage( message, requestHeaders, requestStream, responseHeaders, responseStream );
}
public void ProcessMessage (IMessage message,
                            ITransportHeaders requestHeaders,
                            Stream requestStream,
                            out ITransportHeaders responseHeaders,
                            out Stream responseStream)
{
    // Print the request message properties.
    Console.WriteLine("---- Message from the client ----");
    IDictionary dictionary = message.Properties;
    foreach (Object key in dictionary.Keys)
    {
        Console.WriteLine("{0} = {1}", key, dictionary[key]);
    }
    Console.WriteLine("---------------------------------");

    // Hand off to the next sink in the chain.
    nextSink.ProcessMessage(message, requestHeaders, requestStream, out responseHeaders, out responseStream);
}

적용 대상

추가 정보