Skip to content

Instantly share code, notes, and snippets.

@lkurzyniec
Created June 26, 2020 06:56
Show Gist options
  • Save lkurzyniec/e23c0ae364c1f4fc8931c5ebf723793a to your computer and use it in GitHub Desktop.
Save lkurzyniec/e23c0ae364c1f4fc8931c5ebf723793a to your computer and use it in GitHub Desktop.
Code snippet for CancellationToken
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>CancellationToken</Title>
<Shortcut>ctoken</Shortcut>
<Description>Code snippet for CancellationToken</Description>
<Author>Łukasz Kurzyniec</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>System.Threading</Namespace>
</Import>
</Imports>
<Declarations>
<Literal>
<ID>name</ID>
<Default>cancellationToken</Default>
<ToolTip>Name for the parameter</ToolTip>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[CancellationToken $name$$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
@lkurzyniec
Copy link
Author

lkurzyniec commented Nov 19, 2020

Place it in C:\Users\[username]\Documents\Visual Studio 2019\Code Snippets\Visual C#\My Code Snippets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment