ActiveXMessageFormatter.CanRead(Message) 方法

定义

确定格式化程序是否可以反序列化消息的内容。Determines whether the formatter can deserialize the contents of the message.

public:
 virtual bool CanRead(System::Messaging::Message ^ message);
public bool CanRead (System.Messaging.Message message);
abstract member CanRead : System.Messaging.Message -> bool
override this.CanRead : System.Messaging.Message -> bool
Public Function CanRead (message As Message) As Boolean

参数

message
Message

要检查的 MessageThe Message to inspect.

返回

Boolean

如果 ActiveXMessageFormatter 可以反序列化消息,则为 true;否则为 falsetrue if the ActiveXMessageFormatter can deserialize the message; otherwise, false.

实现

例外

message 参数为 nullThe message parameter is null.

注解

CanReadfalse如果消息消息不是消息队列 ActiveX 控件可以反序列化的基元或未实现接口,则返回 IPersistStreamCanRead returns false if the message body is not a primitive that the Message Queuing ActiveX control can deserialize or if it does not implement the IPersistStream interface.

适用于