MessagePropertyFilter.DigitalSignature 属性

定义

获取或设置一个值,该值指示接收或查看消息时是否检索 DigitalSignature 属性信息。

public:
 property bool DigitalSignature { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgDigitalSignature")]
public bool DigitalSignature { get; set; }
[<System.Messaging.MessagingDescription("MsgDigitalSignature")>]
member this.DigitalSignature : bool with get, set
Public Property DigitalSignature As Boolean

属性值

如果接收 DigitalSignature 信息,则为 true;否则为 false。 默认值为 false

属性

示例

下面的代码示例演示如何使用 DigitalSignature 属性。

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's DigitalSignature property.
queue->MessageReadPropertyFilter->
    DigitalSignature = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// DigitalSignature property.
Console::WriteLine("Message.DigitalSignature: {0}", 
    orderMessage->DigitalSignature);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's DigitalSignature property.
queue.MessageReadPropertyFilter.DigitalSignature = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's DigitalSignature property.
Console.WriteLine("Message.DigitalSignature: {0}",
    orderMessage.DigitalSignature);

注解

DigitalSignature类的 Message 属性指定用于对消息进行身份验证的数字签名。 在大多数情况下,当发送应用程序请求身份验证时,它由消息队列生成和设置。

适用于

另请参阅