Skip to content

Instantly share code, notes, and snippets.

@Xiaoy312
Created January 28, 2016 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Xiaoy312/7ba7575694ec40432f44 to your computer and use it in GitHub Desktop.
Save Xiaoy312/7ba7575694ec40432f44 to your computer and use it in GitHub Desktop.
ReactiveUI snippets
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Define a RxIU Property</Title>
<Shortcut>rxprop</Shortcut>
<Description>RxIU Property</Description>
<Author>Xiaoy312</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>object</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name</ToolTip>
<Default>MyProperty</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[$type$ $property$; //hack: Press Ctrl+L to remove this
#region public $type$ $property$
private $type$ m_$property$;
public $type$ $property$
{
get { return m_$property$; }
set { this.RaiseAndSetIfChanged(ref m_$property$, value); }
}
#endregion
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment