Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit dfbda71

Browse files
Merge pull request #193 from jterry75/issue190
Issue #190: Impove string-contained code snippets
2 parents d6dc927 + bd440f1 commit dfbda71

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Microsoft.Research/ManagedContract.Setup/CSharpCodeSnippets/contractensuresnotisnullorempty.snippet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<SnippetTypes>
66
<SnippetType>Expansion</SnippetType>
77
</SnippetTypes>
8-
<Title>Contract.Ensures(!String.IsNullOrEmpty(Contract.Result()))</Title>
8+
<Title>Contract.Ensures(!string.IsNullOrEmpty(Contract.Result()))</Title>
99
<Shortcut>cesn</Shortcut>
1010
<Description>Emits an 'ensures' clause specifying result not null or empty</Description>
1111
<Author>Jonathan de Halleux</Author>
@@ -18,7 +18,7 @@
1818
</Imports>
1919
<Declarations>
2020
</Declarations>
21-
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>()));
21+
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Ensures(!string.IsNullOrEmpty(Contract.Result<string>()));
2222
$end$]]></Code>
2323
</Snippet>
2424
</CodeSnippet>

Microsoft.Research/ManagedContract.Setup/CSharpCodeSnippets/contractinvariantnotisnullorempty.snippet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</SnippetTypes>
88
<Title>Contract.Invariant</Title>
99
<Shortcut>cisn</Shortcut>
10-
<Description>Emits a 'Contract.Invariant' not String.IsNullOrEmpty clause</Description>
10+
<Description>Emits a 'Contract.Invariant' not string.IsNullOrEmpty clause</Description>
1111
<Author>Jonathan de Halleux</Author>
1212
</Header>
1313
<Snippet>
@@ -25,7 +25,7 @@
2525
</Function>
2626
</Object>
2727
</Declarations>
28-
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Invariant(!String.IsNullOrEmpty($expression$));$end$]]></Code>
28+
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Invariant(!string.IsNullOrEmpty($expression$));$end$]]></Code>
2929
</Snippet>
3030
</CodeSnippet>
3131
</CodeSnippets>

Microsoft.Research/ManagedContract.Setup/CSharpCodeSnippets/contractrequiresalwaysnotisnullorempty.snippet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<SnippetTypes>
66
<SnippetType>Expansion</SnippetType>
77
</SnippetTypes>
8-
<Title>Contract.Requires&lt;ArgumentException&gt;(!String.IsNullOrEmpty(..))</Title>
8+
<Title>Contract.Requires&lt;ArgumentException&gt;(!string.IsNullOrEmpty(..))</Title>
99
<Shortcut>cresn</Shortcut>
1010
<Description>Emits a 'requires with exception' not IsNullOrEmpty</Description>
1111
<Author>Jonathan de Halleux</Author>
@@ -25,7 +25,7 @@
2525
</Function>
2626
</Object>
2727
</Declarations>
28-
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires<ArgumentException>(!String.IsNullOrEmpty($variable$));$end$]]></Code>
28+
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires<ArgumentException>(!string.IsNullOrEmpty($variable$));$end$]]></Code>
2929
</Snippet>
3030
</CodeSnippet>
3131
</CodeSnippets>

Microsoft.Research/ManagedContract.Setup/CSharpCodeSnippets/contractrequiresnotisnullorempty.snippet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<SnippetTypes>
66
<SnippetType>Expansion</SnippetType>
77
</SnippetTypes>
8-
<Title>Contract.Requires(!String.IsNullOrEmpty(..))</Title>
8+
<Title>Contract.Requires(!string.IsNullOrEmpty(..))</Title>
99
<Shortcut>crsn</Shortcut>
1010
<Description>Emits a 'requires' not IsNullOrEmpty</Description>
1111
<Author>Jonathan de Halleux</Author>
@@ -25,7 +25,7 @@
2525
</Function>
2626
</Object>
2727
</Declarations>
28-
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires(!String.IsNullOrEmpty($variable$));$end$]]></Code>
28+
<Code Language="CSharp" Kind="method body"><![CDATA[Contract.Requires(!string.IsNullOrEmpty($variable$));$end$]]></Code>
2929
</Snippet>
3030
</CodeSnippet>
3131
</CodeSnippets>

0 commit comments

Comments
 (0)