Last active
December 11, 2015 03:48
-
-
Save jonathascosta/4540534 to your computer and use it in GitHub Desktop.
Rules property snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <Header> | |
| <Title>Rules Property</Title> | |
| <Author>Jonathas Piazzarollo Costa</Author> | |
| <Shortcut>rulesproperty</Shortcut> | |
| <Description>Creates a Rules property.</Description> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> | |
| </SnippetTypes> | |
| </Header> | |
| <Snippet> | |
| <Declarations> | |
| <Literal> | |
| <ID>type</ID> | |
| <ToolTip>Rules class name</ToolTip> | |
| <Default>Rules</Default> | |
| </Literal> | |
| <Literal> | |
| <ID>member</ID> | |
| <ToolTip>Member name</ToolTip> | |
| <Default>_rules</Default> | |
| </Literal> | |
| <Literal> | |
| <ID>property</ID> | |
| <ToolTip>Property name</ToolTip> | |
| <Default>Rules</Default> | |
| </Literal> | |
| </Declarations> | |
| <Code Language="csharp"> | |
| <![CDATA[private $type$ $member$; | |
| public virtual $type$ $property$ | |
| { | |
| get { return ($member$ != null) ? $member$ : new $type$(); } | |
| set { $member$ = value; } | |
| } | |
| $end$]]> | |
| </Code> | |
| </Snippet> | |
| </CodeSnippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment