-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExcelToCSharp.snippet
59 lines (57 loc) · 1.48 KB
/
ExcelToCSharp.snippet
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
53
54
55
56
57
58
59
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<!--Csv To Static Table-->
<CodeSnippet Format="1.0.0">
<Header>
<Title>
Build Csv Static Table Code
</Title>
<Shortcut>csv</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>info</ID>
<ToolTip>Info Class</ToolTip>
<Default>XXInfo</Default>
</Literal>
<Literal>
<ID>note</ID>
<ToolTip>Note Name</ToolTip>
<Default>xx</Default>
</Literal>
<Literal>
<ID>dic</ID>
<ToolTip>Dic Name</ToolTip>
<Default>xxDic</Default>
</Literal>
<Literal>
<ID>csv</ID>
<ToolTip>Csv Name</ToolTip>
<Default>csv</Default>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[
private Dictionary<int, $info$> _$dic$;
/// <summary>
/// $note$静态数据表
/// </summary>
public Dictionary<int, $info$> $dic$
{
get
{
if (_$dic$ == null)
{
_$dic$ = CsvLoad.CsvToDictionary<int, $info$>("$csv$", "id");
}
return _$dic$;
}
}
$end$
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>