private static void PopulatePropertyWizards(WizardDefinition wizardDefinition) { foreach (NamedElement propertyWizard in wizardDefinition.RegisteredItem.PropertyWizards) { wizardDefinition.PropertyWizardDefinitions.Add(CreatePropertyWizardDefinition(propertyWizard.Name)); } }
public static WizardDefinition CreateWizardDefinition(string registeredWizardName, WizardStatus wizardStatus) { WizardElement registeredWizard = ConfigurationManager.Wizards[registeredWizardName]; IWizard wizardInstance = (IWizard)registeredWizard.CreateInstance(); WizardDefinition wizardDefinition = wizardInstance.Definition; wizardDefinition.Status = wizardStatus; if (wizardInstance is IDisposable) { (wizardInstance as IDisposable).Dispose(); } return(wizardDefinition); }