-
Notifications
You must be signed in to change notification settings - Fork 0
/
Converter.snippet
127 lines (125 loc) · 4.3 KB
/
Converter.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Converter</Title>
<Author>Simon Gaudin</Author>
<Description>Creates an empty converter class implementing the IValueConverter interface</Description>
<Shortcut>converter</Shortcut>
</Header>
<Snippet>
<Code Language="CSharp" Kind="file">
<![CDATA[
/// <summary>
/// $ClassComment$
/// </summary>
[ValueConversion(sourceType: typeof($SourceType$), targetType: typeof($TargetType$))]
public class $ClassName$ : IValueConverter
{
/// <summary>
/// $ConvertComment$
/// </summary>
/// <param name="value">$ConvertValueComment$</param>
/// <param name="targetType">The parameter is not used.</param>
/// <param name="parameter">$ConvertParameterComment$</param>
/// <param name="culture">The parameter is not used.</param>
/// <returns>$ConvertReturnComment$</returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
$end$throw new NotImplementedException();
}
/// <summary>
/// $ConvertBackComment$
/// </summary>
/// <param name="value">$ConvertBackValueComment$</param>
/// <param name="targetType">The parameter is not used.</param>
/// <param name="parameter">$ConvertBackParameterComment$</param>
/// <param name="culture">The parameter is not used.</param>
/// <returns>$ConvertBackReturnComment$</returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}]]>
</Code>
<Declarations>
<Literal>
<ID>ClassName</ID>
<ToolTip>The name of the converter</ToolTip>
<Default>MyConverter</Default>
</Literal>
<Literal>
<ID>ParamsComment</ID>
<ToolTip>Comment for the converter parameters</ToolTip>
<Default>The parameter is not used.</Default>
</Literal>
<Literal>
<ID>ClassComment</ID>
<ToolTip>Class comment</ToolTip>
<Default>!!! Explanation of the class here !!!</Default>
</Literal>
<Literal>
<ID>ConvertComment</ID>
<ToolTip>Convert comment</ToolTip>
<Default>!!! Explanation of the Convert method here !!!</Default>
</Literal>
<Literal>
<ID>ConvertBackComment</ID>
<ToolTip>Convert Back comment</ToolTip>
<Default>!!! Explanation of the ConvertBack method here !!!</Default>
</Literal>
<Literal>
<ID>ConvertValueComment</ID>
<ToolTip>Convert Value comment</ToolTip>
<Default>The parameter is not used.</Default>
</Literal>
<Literal>
<ID>ConvertParameterComment</ID>
<ToolTip>Convert Parameter comment</ToolTip>
<Default>The parameter is not used.</Default>
</Literal>
<Literal>
<ID>ConvertReturnComment</ID>
<ToolTip>Convert Return comment</ToolTip>
<Default>!!! Explanation of the return of the Convert method here !!!</Default>
</Literal>
<Literal>
<ID>ConvertBackValueComment</ID>
<ToolTip>Convert Value comment</ToolTip>
<Default>The parameter is not used.</Default>
</Literal>
<Literal>
<ID>ConvertBackParameterComment</ID>
<ToolTip>Convert Parameter comment</ToolTip>
<Default>The parameter is not used.</Default>
</Literal>
<Literal>
<ID>ConvertBackReturnComment</ID>
<ToolTip>Convert Return comment</ToolTip>
<Default>!!! Explanation of the return of the Convert method here !!!</Default>
</Literal>
<Literal>
<ID>SourceType</ID>
<ToolTip>Type to convert from</ToolTip>
<Default>object</Default>
</Literal>
<Literal>
<ID>TargetType</ID>
<ToolTip>Type to convert to</ToolTip>
<Default>object</Default>
</Literal>
</Declarations>
<Imports>
<Import>
<Namespace>System</Namespace>
</Import>
<Import>
<Namespace>System.Globalization</Namespace>
</Import>
<Import>
<Namespace>System.Windows.Data</Namespace>
</Import>
</Imports>
</Snippet>
</CodeSnippet>
</CodeSnippets>