私は .Net Remoting プロジェクトに取り組んでいます。リモート呼び出しと戻り値、または例外の可能性を監視したいと考えています。IMessageSink を実装しました
Public Function SyncProcessMessage(ByVal msg As System.Runtime.Remoting.Messaging.IMessage) As System.Runtime.Remoting.Messaging.IMessage Implements System.Runtime.Remoting.Messaging.IMessageSink.SyncProcessMessage
Dim replyMsg As IMessage = _NextMessageSink.SyncProcessMessage(msg)
if {ReplyMsg Contains Exception of type a} then
do something
else if {ReplyMsg Contains Exception of type b} then
do someshing else
End If
Return replyMsg
End Function
サービスが例外をスローした場合、ReplyMsg には LogicalCallContext のみが含まれます。例外の種類を見つけるにはどうすればよいですか?