MessagePropertyFilter.Body Propriedade
Definição
public:
property bool Body { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgBody")]
public bool Body { get; set; }
[<System.Messaging.MessagingDescription("MsgBody")>]
member this.Body : bool with get, set
Public Property Body As Boolean
Valor da propriedade
true para receber Body informações; caso contrário, false .true to receive Body information; otherwise, false. O padrão é true.The default is true.
- Atributos
Exemplos
O exemplo de código a seguir demonstra o uso da Body propriedade.The following code example demonstrates the use of the Body property.
// Set the queue's MessageReadPropertyFilter property
// to enable the message's Body property.
queue->MessageReadPropertyFilter->Body = 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 Body property.
Console::WriteLine("Message.Body: {0}",
orderMessage->Body);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Body property.
queue.MessageReadPropertyFilter.Body = 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 Body property.
Console.WriteLine("Message.Body: {0}", orderMessage.Body);
Comentários
A Body propriedade da Message classe representa o conteúdo serializado da mensagem.The Body property of the Message class represents the serialized contents of the message. O corpo pode conter até 4 MB de dados.The body can contain up to 4 MB of data.