diff options
Diffstat (limited to 'tools/Contracts/Languages/CSharp/Code Contract Snippets')
18 files changed, 0 insertions, 560 deletions
diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassert.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassert.snippet deleted file mode 100644 index 7a47503..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassert.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Assert</Title> - <Shortcut>cca</Shortcut> - <Description>Emits a 'Contract.Assert' clause</Description> - <Author>MaF</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>condition that must be true</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Assert($condition$);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassume.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassume.snippet deleted file mode 100644 index 4f78ef9..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractassume.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Assume</Title> - <Shortcut>cam</Shortcut> - <Description>Emits a 'Contract.Assume' clause</Description> - <Author>MaF</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>condition that must be true</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Assume($condition$);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensures.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensures.snippet deleted file mode 100644 index ecff2bf..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensures.snippet +++ /dev/null @@ -1,22 +0,0 @@ -<?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</Title> - <Shortcut>ce</Shortcut> - <Description>Emits a 'ensures' clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures($end$);]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnonnull.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnonnull.snippet deleted file mode 100644 index 3e4f24b..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnonnull.snippet +++ /dev/null @@ -1,32 +0,0 @@ -<?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.Result() != null)</Title> - <Shortcut>cen</Shortcut> - <Description>Emits an 'ensures' clause specifying result not null</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>type</ID> - <ToolTip>the method return type</ToolTip> - <Default>string</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures(Contract.Result<$type$>() != null); -$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnotisnullorempty.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnotisnullorempty.snippet deleted file mode 100644 index 6520876..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractensuresnotisnullorempty.snippet +++ /dev/null @@ -1,25 +0,0 @@ -<?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(!String.IsNullOrEmpty(Contract.Result()))</Title> - <Shortcut>cesn</Shortcut> - <Description>Emits an 'ensures' clause specifying result not null or empty</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>())); -$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinterface.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinterface.snippet deleted file mode 100644 index 6d90b95..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinterface.snippet +++ /dev/null @@ -1,41 +0,0 @@ -<?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> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariant.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariant.snippet deleted file mode 100644 index 218a468..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariant.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Invariant</Title> - <Shortcut>ci</Shortcut> - <Description>Emits a 'Contract.Invariant' clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>boolean invariant condition</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Invariant($condition$);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantmethod.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantmethod.snippet deleted file mode 100644 index 20eef7a..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantmethod.snippet +++ /dev/null @@ -1,36 +0,0 @@ -<?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 Invariant Method</Title> - <Shortcut>cim</Shortcut> - <Description>Boiler plate invariant method</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>boolean precondition</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[[ContractInvariantMethod] -void ObjectInvariant() -{ - Contract.Invariant($condition$);$end$ -} -]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnonnull.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnonnull.snippet deleted file mode 100644 index f061cea..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnonnull.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Invariant</Title> - <Shortcut>cin</Shortcut> - <Description>Emits a 'Contract.Invariant' non-null clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>expression</ID> - <ToolTip>the non-null expression</ToolTip> - <Default>m_X</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Invariant($expression$ != null);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnotisnullorempty.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnotisnullorempty.snippet deleted file mode 100644 index d91b35c..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractinvariantnotisnullorempty.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Invariant</Title> - <Shortcut>cisn</Shortcut> - <Description>Emits a 'Contract.Invariant' not String.IsNullOrEmpty clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>expression</ID> - <ToolTip>expression that is not null or empty</ToolTip> - <Default>m_X</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Invariant(!String.IsNullOrEmpty($expression$));$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractold.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractold.snippet deleted file mode 100644 index 7cbbfb4..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractold.snippet +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> - <CodeSnippet Format="1.0.0"> - <Header> - <Title>Contract.OldValue</Title> - <Shortcut>co</Shortcut> - <Description>Emits a 'Contract.OldValue' expression</Description> - <Author>Manuel Fahndrich</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>expression</ID> - <ToolTip>old expression</ToolTip> - <Default>x</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="any"><![CDATA[Contract.OldValue($expression$)$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequires.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequires.snippet deleted file mode 100644 index 770fbc7..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequires.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Requires</Title> - <Shortcut>cr</Shortcut> - <Description>Emits a 'Contract.Requires' clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>precondition expression</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires($condition$);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalways.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalways.snippet deleted file mode 100644 index eb082d1..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalways.snippet +++ /dev/null @@ -1,38 +0,0 @@ -<?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.Requires<E></Title> - <Shortcut>cre</Shortcut> - <Description>Emits a 'Contract.Requires<Exc>' clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>exception</ID> - <ToolTip>Exception type</ToolTip> - <Default>ArgumentException</Default> - <Function> - </Function> - </Object> - <Object Editable="true"> - <ID>condition</ID> - <ToolTip>precondition expression</ToolTip> - <Default>false</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires<$exception$>($condition$);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotisnullorempty.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotisnullorempty.snippet deleted file mode 100644 index 44f1bf6..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotisnullorempty.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Requires<ArgumentException>(!String.IsNullOrEmpty(..))</Title> - <Shortcut>cresn</Shortcut> - <Description>Emits a 'requires with exception' not IsNullOrEmpty</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>variable</ID> - <ToolTip>argument name</ToolTip> - <Default>arg</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires<ArgumentException>(!String.IsNullOrEmpty($variable$));$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotnull.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotnull.snippet deleted file mode 100644 index 2f1ca2a..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresalwaysnotnull.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Requires<ArgumentNullException>(.. != null)</Title> - <Shortcut>cren</Shortcut> - <Description>Emits a 'requires with exception' not null clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>variable</ID> - <ToolTip>variable name</ToolTip> - <Default>arg</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires<ArgumentNullException>($variable$ != null, "$variable$");$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotisnullorempty.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotisnullorempty.snippet deleted file mode 100644 index d6df838..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotisnullorempty.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Requires(!String.IsNullOrEmpty(..))</Title> - <Shortcut>crsn</Shortcut> - <Description>Emits a 'requires' not IsNullOrEmpty</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>variable</ID> - <ToolTip>argument name</ToolTip> - <Default>arg</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires(!String.IsNullOrEmpty($variable$));$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotnull.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotnull.snippet deleted file mode 100644 index e0607cc..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractrequiresnotnull.snippet +++ /dev/null @@ -1,31 +0,0 @@ -<?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.Requires(.. != null)</Title> - <Shortcut>crn</Shortcut> - <Description>Emits a 'requires' not null clause</Description> - <Author>Jonathan de Halleux</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>variable</ID> - <ToolTip>variable name</ToolTip> - <Default>arg</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires($variable$ != null);$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> diff --git a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractresult.snippet b/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractresult.snippet deleted file mode 100644 index 3e3f4f2..0000000 --- a/tools/Contracts/Languages/CSharp/Code Contract Snippets/contractresult.snippet +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> - <CodeSnippet Format="1.0.0"> - <Header> - <Title>Contract.Result</Title> - <Shortcut>crr</Shortcut> - <Description>Emits a 'Contract.Result' expression</Description> - <Author>Manuel Fahndrich</Author> - </Header> - <Snippet> - <Imports> - <Import> - <Namespace>System.Diagnostics.Contracts</Namespace> - </Import> - </Imports> - <Declarations> - <Object Editable="true"> - <ID>type</ID> - <ToolTip>method return type</ToolTip> - <Default>int</Default> - <Function> - </Function> - </Object> - </Declarations> - <Code Language="CSharp" Kind="any"><![CDATA[Contract.Result<$type$>()$end$]]></Code> - </Snippet> - </CodeSnippet> -</CodeSnippets> |