Exemple #1
0
 /// <summary>
 /// Overrides Package.OnSaveOptions()
 /// Invoked by the Package class when there are options to be saved to the solution file.
 /// </summary>
 /// <param name="key">The name of the option key to save.</param>
 /// <param name="stream">The stream to save the option data to.</param>
 protected override void OnSaveOptions(string key, Stream stream)
 {
     try
     {
         if (0 == string.Compare(key, CommandLineOptionKey))
         {
             Logging.WriteLine("Saving CommandLineEditor options");
             CommandLineEditor.SaveOptions(stream);
         }
         else if (0 == string.Compare(key, BatchBuildSetsOptionKey))
         {
             Logging.WriteLine("Saving BatchBuilder options");
             BatchBuilder.SaveOptions(stream);
         }
     }
     catch (Exception Ex)
     {
         // Couldn't save options
         Exception AppEx = new ApplicationException("OnSaveOptions() failed with key " + key, Ex);
         Logging.WriteLine(AppEx.ToString());
         throw AppEx;
     }
 }