Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.10 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>My Prop Changer</Title>
  6.       <Shortcut>mypropch</Shortcut>
  7.       <Description>Code snippet for custom property and backing field</Description>
  8.       <Author>GrrAngry</Author>
  9.       <SnippetTypes>
  10.         <SnippetType>Expansion</SnippetType>
  11.       </SnippetTypes>
  12.     </Header>
  13.     <Snippet>
  14.       <Declarations>
  15.         <Literal>
  16.           <ID>type</ID>
  17.           <ToolTip>The type of the Property</ToolTip>
  18.           <Default>int</Default>
  19.         </Literal>
  20.         <Literal>
  21.           <ID>property</ID>
  22.           <ToolTip>The name of the Property</ToolTip>
  23.           <Default>MyCustomProperty</Default>
  24.         </Literal>
  25.       </Declarations>
  26.       <Code Language="csharp">
  27.         <![CDATA[private $type$ _$property$;
  28.  public $type$ $property$
  29.  {
  30.    get => _$property$;
  31.    set => Set(() => $property$, ref _$property$, value );
  32.  }
  33.  $end$]]>
  34.       </Code>
  35.     </Snippet>
  36.   </CodeSnippet>
  37. </CodeSnippets>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement