MessagePropertyFilter.AuthenticationProviderName 属性

定义

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

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

属性值

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

属性

示例

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

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's 
// AuthenticationProviderName property.
queue->MessageReadPropertyFilter->
    AuthenticationProviderName = 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 
// AuthenticationProviderName property.
Console::WriteLine(
    "Message.AuthenticationProviderName: {0}", 
    orderMessage->AuthenticationProviderName);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's AuthenticationProviderName property.
queue.MessageReadPropertyFilter.AuthenticationProviderName = 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 AuthenticationProviderName
// property.
Console.WriteLine("Message.AuthenticationProviderName: {0}",
    orderMessage.AuthenticationProviderName);

注解

AuthenticationProviderName类的 Message 属性指定用于生成消息数字签名的加密提供程序的名称。 Message.AuthenticationProviderName 通常在处理外部队列时使用 。

Microsoft 消息队列以外的队列系统中存在外部队列。 Microsoft 消息队列通过连接器应用程序与此类队列通信。

适用于

另请参阅