/// <summary> /// Determine if the engine has collected enough information to perform work. /// </summary> bool IDataSourceWizardEngine.CanPerformWork(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "The passed in wizardData parameter is not of EdmDataSourceWizardData type"); return(edmWizardData != null && edmWizardData.EDMProjectItem != null && !edmWizardData.IsCancelled); }
ProjectItem[] IDataSourceWizardEngine.PerformWork(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "The passed in wizardData parameter is not of EdmDataSourceWizardData type"); if (edmWizardData != null && edmWizardData.EDMProjectItem != null && !edmWizardData.IsCancelled) { // Running custom tool so code behind is generated correctly; for some reason currently this is not the case until we manually run custom tool. VsUtils.RunCustomTool(edmWizardData.EDMProjectItem); return(new[] { edmWizardData.EDMProjectItem }); } return(null); }
DataSourceWizardPageBase IDataSourceWizardEngine.GetFirstPage(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "wizardData parameter is not of EdmDataSourceWizardData type"); if (edmWizardData != null) { if (edmWizardData.EDMProjectItem != null) { // Re-entrant mode, launch UpdateModelFromDatabase wizard return(_wizardPages[1]); } else { // Launch ModelGen wizard. return(_wizardPages[0]); } } return(null); }
/// <summary> /// Clean data bucket /// </summary> /// <param name="wizardData"></param> void IDataSourceWizardEngine.CleanData(IDataSourceWizardData wizardData) { // Do nothing }
ProjectItem[] IDataSourceWizardEngine.PerformWork(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "The passed in wizardData parameter is not of EdmDataSourceWizardData type"); if (edmWizardData != null && edmWizardData.EDMProjectItem != null && !edmWizardData.IsCancelled) { // Running custom tool so code behind is generated correctly; for some reason currently this is not the case until we manually run custom tool. VsUtils.RunCustomTool(edmWizardData.EDMProjectItem); return new[] { edmWizardData.EDMProjectItem }; } return null; }
/// <summary> /// Determine if the engine has collected enough information to perform work. /// </summary> bool IDataSourceWizardEngine.CanPerformWork(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "The passed in wizardData parameter is not of EdmDataSourceWizardData type"); return (edmWizardData != null && edmWizardData.EDMProjectItem != null && !edmWizardData.IsCancelled); }
DataSourceWizardPageBase IDataSourceWizardEngine.GetFirstPage(IDataSourceWizardData wizardData) { var edmWizardData = wizardData as EdmDataSourceWizardData; Debug.Assert(edmWizardData != null, "wizardData parameter is not of EdmDataSourceWizardData type"); if (edmWizardData != null) { if (edmWizardData.EDMProjectItem != null) { // Re-entrant mode, launch UpdateModelFromDatabase wizard return _wizardPages[1]; } else { // Launch ModelGen wizard. return _wizardPages[0]; } } return null; }