﻿<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Specify the Formatter for Retrieved Messages</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Determines how a message body is deserialized.</Description>
      <Shortcut>mqFormat</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>System.Messaging.dll</Assembly>
          <Url />
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>System</Namespace>
        </Import>
        <Import>
          <Namespace>Microsoft.VisualBasic</Namespace>
        </Import>
        <Import>
          <Namespace>System.Messaging</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal>
          <ID>BodyType</ID>
          <Type>System.Type</Type>
          <ToolTip>Replace with a Type object that matches the message body type.</ToolTip>
          <Default>GetType(String)</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim msg As New Message()
msg.Formatter = _
New XmlMessageFormatter(New Type() {$BodyType$})]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>