Sdílet prostřednictvím


MessagePropertyFilter.AcknowledgeType Vlastnost

Definice

Získá nebo nastaví hodnotu, která určuje, zda se mají načíst AcknowledgeType informace o vlastnosti při příjmu nebo náhledu zprávy.

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

Hodnota vlastnosti

truepro příjem AcknowledgeType informací, jinak . false Výchozí formát je true.

Atributy

Příklady

Následující příklad kódu ukazuje použití AcknowledgeType vlastnosti .

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

Poznámky

Vlastnost AcknowledgeTypeMessage třídy určuje typ potvrzovací zprávy požadované odesílající aplikací. Typ potvrzení definuje, kdy se potvrzení vrátí. Message.AcknowledgeType Nastavte vlastnost před odesláním zprávy tak, aby požadovala konkrétní typ potvrzení.

Platí pro

Viz také