Advertisement
zORg_alex
Nov 22nd, 2024
1
0
Never
This is comment for paste Assembly Reload safe initialization
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Visual Studio snippet:
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  4.   <CodeSnippet Format="1.0.0">
  5.     <Header>
  6.       <Title>Initialize OnAssemblyReload</Title>
  7.       <Shortcut>onassemblyreload</Shortcut>
  8.     </Header>
  9.     <Snippet>
  10.       <Code Language="csharp" Delimiter="$">
  11.           <![CDATA[private void Start() => Initialize();
  12. private void OnEnable() => this.OnAssemblyReload(Initialize);
  13.  
  14. private void Initialize()
  15. {
  16.     $selected$$end$
  17. }$end$]]></Code>
  18.     </Snippet>
  19.   </CodeSnippet>
  20. </CodeSnippets>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement