-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpropll.snippet
More file actions
52 lines (51 loc) · 1.63 KB
/
propll.snippet
File metadata and controls
52 lines (51 loc) · 1.63 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2010/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>遅延初期化を行うプロパティ</Title>
<Description>遅延初期化を行うプロパティを作成します。</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Shortcut>propll</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>propertyType</ID>
<ToolTip>プロパティの型</ToolTip>
<Default>int</Default>
</Literal>
<Literal>
<ID>propertyName</ID>
<ToolTip>プロパティ名</ToolTip>
<Default>MyProperty</Default>
</Literal>
<Literal>
<ID>field</ID>
<ToolTip>このプロパティのバッキング変数</ToolTip>
<Default>myVar</Default>
</Literal>
<Literal>
<ID>implementation</ID>
<ToolTip>プロパティの初期化処理</ToolTip>
<Default>throw new NotImplementedException();</Default>
</Literal>
</Declarations>
<Code Language="csharp" Kind="method decl">
<![CDATA[private $propertyType$ $field$;
public $propertyType$ $propertyName$
{
get
{
if ($field$ == null)
{
$implementation$
}
return $field$;
}
}]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>