MessagePropertyFilter.ConnectorType Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства ConnectorType при получении или считывании сообщения.

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

Значение свойства

Значение true означает получение сведений ConnectorType, в противном случае — значение false. Значение по умолчанию — false.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование ConnectorType свойство.

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

Комментарии

Свойство ConnectorTypeMessage класса является обязательным, если приложение задает свойство сообщения, которое обычно устанавливается службой Message Queuing. Он используется в следующих двух экземплярах:

  • При передаче сообщения приложением Message.ConnectorType соединителя необходимо, чтобы отправляющие и принимающие приложения интерпретировали свойства безопасности и подтверждения сообщения.

  • При отправке сообщений, зашифрованных приложением Message.ConnectorType , свойство сообщает Message Queuing использовать симметричный ключ.

Применяется к

См. также раздел