Created
November 27, 2012 14:15
-
-
Save johnathan-sewell/4154426 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Example.ExcelAddin | |
{ | |
public partial class ThisAddIn | |
{ | |
[Microsoft.VisualStudio.Tools.Applications.Runtime.Cached()] | |
public String MyCachedData; | |
private void ThisAddIn_Startup(object sender, System.EventArgs e) | |
{ | |
StartCaching("MyCachedData"); | |
if (string.IsNullOrEmpty(MyCachedData)) | |
MyCachedData = "hello cache"; | |
} | |
private void ThisAddIn_Shutdown(object sender, System.EventArgs e) | |
{ | |
} | |
#region VSTO generated code | |
/// <summary> | |
/// Required method for Designer support - do not modify | |
/// the contents of this method with the code editor. | |
/// </summary> | |
private void InternalStartup() | |
{ | |
this.Startup += new System.EventHandler(ThisAddIn_Startup); | |
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); | |
} | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment