private void SaveSettings(TModel model) { Contract.Assert(model != null); IScaffoldingSettings modelSettings = model as IScaffoldingSettings; if (modelSettings != null && VisualStudioIntegration != null) { // The project settings will be null if the project doesn't implement settings (project systems are // extensible). IProjectSettings projectSettings = VisualStudioIntegration.GetProjectSettings(Context.ActiveProject); if (projectSettings != null) { try { modelSettings.SaveSettings(projectSettings); } catch (Exception ex) { // We don't want to make it a blocking issue if we're unable to save settings. Debug.Fail("Failed to save settings", ex.Message); } } } }
private void SaveSettings(TModel model) { IScaffoldingSettings scaffoldingSetting = (object)model as IScaffoldingSettings; if (scaffoldingSetting != null && this.VisualStudioIntegration != null) { IProjectSettings projectSettings = this.VisualStudioIntegration.GetProjectSettings(base.Context.ActiveProject); if (projectSettings != null) { try { scaffoldingSetting.SaveSettings(projectSettings); } catch (Exception exception) { } } } }