-
-
Save Taka414/e48a078564a536ab105891057ecad9a5 to your computer and use it in GitHub Desktop.
This file contains 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" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>rx</Title> | |
<Shortcut>rx</Shortcut> | |
<Description>ReactiveProp</Description> | |
<Author></Author> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal> | |
<ID>valueType</ID> | |
<Default>int</Default> | |
<ToolTip>公開する変数の型で置き換えます。</ToolTip> | |
</Literal> | |
<Literal> | |
<ID>propName</ID> | |
<Default>Sample</Default> | |
<ToolTip>公開するプロパティの名前で置き換えます。</ToolTip> | |
</Literal> | |
<Literal> | |
<ID>fieldName</ID> | |
<Default>sample</Default> | |
<ToolTip>内部で使用する変数の名前で置き換えます。</ToolTip> | |
</Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[public $valueType$ $propName$ { get => this.$fieldName$.Value; set => this.$fieldName$.Value = value; } | |
public IObservable<$valueType$> $propName$Changed => this.$fieldName$; | |
private readonly ReactiveProperty<$valueType$> $fieldName$ = new ReactiveProperty<$valueType$>();$end$]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment