Changeset 7473 for trunk/tools/HL3Snippets/HL3.DefineEvent.snippet
- Timestamp:
- 02/16/12 08:21:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/HL3Snippets/HL3.DefineEvent.snippet
r5036 r7473 20 20 </Function> 21 21 </Literal> 22 <Literal Editable="true"> 23 <ID>Modifier</ID> 24 <ToolTip>Visibility modifier</ToolTip> 25 <Default>protected virtual</Default> 26 <Function> 27 </Function> 28 </Literal> 22 29 </Declarations> 23 30 <Code Language="csharp"><![CDATA[public event EventHandler $EventName$; 24 25 protected virtual void On$EventName$() { 26 EventHandler handler = $EventName$; 27 if (handler != null) 28 handler(this, EventArgs.Empty); 31 $Modifier$ void On$EventName$() { 32 var handler = $EventName$; 33 if (handler != null) handler(this, EventArgs.Empty); 29 34 }]]></Code> 30 35 </Snippet>
Note: See TracChangeset
for help on using the changeset viewer.