- Separate public/private literals
- For RxUI 6
- With
private
, because that's the way I like it - Single line get/set
Forked from rzhw/README.md
private
, because that's the way I like itForked from rzhw/README.md
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Reactive Property</Title> | |
<Shortcut>rpr</Shortcut> | |
<Description>Creates a property that calls RaiseAndSetIfChanged</Description> | |
<Author>Anderson Imes, Richard Wang, Wayne Maurer</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>type</ID> | |
<ToolTip>Type of object in the collection to iterate through</ToolTip> | |
<Default>var</Default> | |
</Literal> | |
<Literal> | |
<ID>publicname</ID> | |
<ToolTip>Public name of the property</ToolTip> | |
<Default>PublicName</Default> | |
</Literal> | |
<Literal> | |
<ID>privatename</ID> | |
<ToolTip>Private name of the property</ToolTip> | |
<Default>_privateName</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[private $type$ $privatename$; | |
public $type$ $publicname$ | |
{ | |
get { return $privatename$; } | |
set { this.RaiseAndSetIfChanged(ref $privatename$, value); } | |
}]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |