-
Notifications
You must be signed in to change notification settings - Fork 4
/
propp.snippet
38 lines (38 loc) · 1.1 KB
/
propp.snippet
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
<?xml version="1.0" encoding="utf-8"?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Prism Property</Title>
<Shortcut>propp</Shortcut>
<Author>Brian Lagunas</Author>
<Description>Code snippet for property and backing field</Description>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Replace with the property type</ToolTip>
<Default>string</Default>
</Literal>
<Literal>
<ID>PropertyName</ID>
<ToolTip>Replace with the property name</ToolTip>
<Default>propertyName</Default>
<Default>PropertyName</Default>
</Literal>
<Literal>
<ID>fieldName</ID>
<ToolTip>Replace with the field name</ToolTip>
<Default>fieldName</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[private $type$ $fieldName$;
public $type$ $PropertyName$
{
get { return $fieldName$; }
set { SetProperty(ref $fieldName$, value); }
}$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>