ServerProcessing 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
서버 메시지 처리 상태를 나타냅니다.
public enum class ServerProcessing
[System.Serializable]
public enum ServerProcessing
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum ServerProcessing
[<System.Serializable>]
type ServerProcessing =
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ServerProcessing =
Public Enum ServerProcessing
- 상속
- 특성
필드
Async | 2 | 호출은 비동기식으로 디스패치되는데, 이는 나중에 처리할 수 있도록 싱크가 응답 데이터를 스택에 저장해야 함을 나타냅니다. |
Complete | 0 | 서버가 메시지를 동기식으로 처리합니다. |
OneWay | 1 | 메시지는 디스패치되고 응답은 보낼 수 없습니다. |
예제
public ServerProcessing ProcessMessage(IServerChannelSinkStack myServerChannelSinkStack,
IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream,
out IMessage msg, out ITransportHeaders responseHeaders,
out Stream responseStream)
{
if (myBoolEnabled)
LoggingHelper.PrintRequest(myTextWriterOutput, requestHeaders, ref requestStream);
myServerChannelSinkStack.Push(this, null);
ServerProcessing myServerProcessing =
myNewNextSink.ProcessMessage(myServerChannelSinkStack, requestMsg, requestHeaders, requestStream, out msg,
out responseHeaders, out responseStream);
Console.WriteLine("ServerProcessing.Complete value is: " +ServerProcessing.Complete);
Console.WriteLine("ServerProcessing.OneWay Value is: " +ServerProcessing.OneWay);
Console.WriteLine("ServerProcessing.Async value is: " +ServerProcessing.Async);
switch (myServerProcessing)
{
case ServerProcessing.Complete:
{
myServerChannelSinkStack.Pop(this);
if (myBoolEnabled)
LoggingHelper.PrintResponse(myTextWriterOutput, responseHeaders, ref responseStream);
break;
}
case ServerProcessing.OneWay:
{
myServerChannelSinkStack.Pop(this);
break;
}
case ServerProcessing.Async:
{
myServerChannelSinkStack.Store(this, null);
break;
}
}
return myServerProcessing;
}
Public Function ProcessMessage(ByVal myServerChannelSinkStack As IServerChannelSinkStack, _
ByVal requestMsg As IMessage, ByVal requestHeaders As ITransportHeaders, ByVal requestStream As Stream, ByRef _
msg As IMessage, ByRef responseHeaders As ITransportHeaders, ByRef responseStream _
As Stream) As ServerProcessing Implements IServerChannelSink.ProcessMessage
If myBoolEnabled Then
LoggingHelper.PrintRequest(myTextWriterOutput, requestHeaders, requestStream)
End If
myServerChannelSinkStack.Push(Me, Nothing)
Dim myServerProcessing As ServerProcessing = myNewNextSink.ProcessMessage( _
myServerChannelSinkStack, requestMsg, requestHeaders, requestStream, msg, responseHeaders, responseStream)
Console.WriteLine("ServerProcessing.Complete value is: " + ServerProcessing.Complete.Tostring())
Console.WriteLine("ServerProcessing.OneWay Value is: " + ServerProcessing.OneWay.Tostring())
Console.WriteLine("ServerProcessing.Async value is: " + ServerProcessing.Async.Tostring())
Select Case myServerProcessing
Case ServerProcessing.Complete
myServerChannelSinkStack.Pop(Me)
If myBoolEnabled Then
LoggingHelper.PrintResponse(myTextWriterOutput, responseHeaders, responseStream)
End If
Case ServerProcessing.OneWay
myServerChannelSinkStack.Pop(Me)
Case ServerProcessing.Async
myServerChannelSinkStack.Store(Me, Nothing)
End Select
Return myServerProcessing
End Function 'ProcessMessage
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET