home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / FL_invoke_snippet_121843_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2009-04-01  |  930b  |  35 lines

  1. ∩╗┐<?xml version="1.0" encoding="utf-8" ?>
  2. <CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.     <CodeSnippet Format="1.0.0">
  4.         <Header>
  5.             <Title>invoke</Title>
  6.             <Shortcut>invoke</Shortcut>
  7.             <Description>Code snippet for safely invoking an event</Description>
  8.             <Author>Microsoft Corporation</Author>
  9.             <SnippetTypes>
  10.                 <SnippetType>Expansion</SnippetType>
  11.             </SnippetTypes>
  12.         </Header>
  13.         <Snippet>
  14.             <Declarations>
  15.                 <Literal>
  16.                     <ID>event</ID>
  17.                     <Default>MyEvent</Default>
  18.                     <ToolTip>Event method to invoke</ToolTip>
  19.                 </Literal>
  20.                 <Literal>
  21.                     <ID>DelegateType</ID>
  22.                     <Default>EventHandler</Default>
  23.                     <ToolTip>Delegate type</ToolTip>
  24.                 </Literal>
  25.             </Declarations>
  26.             <Code Language="csharp"><![CDATA[
  27. $DelegateType$ temp = $event$;
  28. if (temp != null)
  29. {
  30. temp($end$);
  31. }]]>
  32.             </Code>
  33.         </Snippet>
  34.     </CodeSnippet>
  35. </CodeSnippets>