summaryrefslogtreecommitdiffstats
path: root/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinterface.snippet
blob: 6d90b95be5ebfd5d27104457fcfd5e155f583769 (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
32
33
34
35
36
37
38
39
40
41
<?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>Contracted Interface</Title>
      <Shortcut>cintf</Shortcut>
      <Description>Boiler plate interface and contract</Description>
      <Author>Maf</Author>
    </Header>
    <Snippet>
      <Imports>
        <Import>
          <Namespace>System.Diagnostics.Contracts</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Object Editable="true">
          <ID>interface</ID>
          <ToolTip>Interface name</ToolTip>
          <Default>IFoo</Default>
          <Function>
          </Function>
        </Object>
      </Declarations>
      <Code Language="CSharp" Kind="type decl"><![CDATA[#region $interface$ contract binding
[ContractClass(typeof($interface$Contract))]
public partial interface $interface$ {
  $end$
}

[ContractClassFor(typeof($interface$))]
abstract class $interface$Contract : $interface$ {
}
#endregion
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>