summaryrefslogtreecommitdiff
path: root/Util/Code Snippets/contractensuresvalret.snippet
blob: b46be4fc1be49c74d8b0aea051fccdfe9bcc0539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>Contract.Ensures(Contract.ValueAtReturn(...)!=null)</Title>
      <Shortcut>cern</Shortcut>
      <Description>Emits a 'Contract.Ensures' non-null out or ref parameter clause</Description>
      <Author>tabarbe</Author>
    </Header>
    <Snippet>
      <Imports>
        <Import>
          <Namespace>System.Diagnostics.Contracts</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Object Editable="true">
          <ID>value</ID>
          <ToolTip>Value that must not be null</ToolTip>
          <Default>arg</Default>
          <Function>
          </Function>
        </Object>
      </Declarations>
      <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures(Contract.ValueAtReturn(out $value$)!=null);$end$]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>