public static TWizardPage AddPage <TWizardPage>(this IWizard wizard) where TWizardPage : IWizardPage { Argument.IsNotNull(() => wizard); return(wizard.InsertPage <TWizardPage>(wizard.Pages.Count())); }
public static IWizardPage AddPage(this IWizard wizard, IWizardPage page) { Argument.IsNotNull(() => wizard); Argument.IsNotNull(() => page); wizard.InsertPage(wizard.Pages.Count(), page); return(page); }
public static TWizardPage InsertPage <TWizardPage>(this IWizard wizard, int index) where TWizardPage : IWizardPage { Argument.IsNotNull(() => wizard); var typeFactory = wizard.GetTypeFactory(); var page = typeFactory.CreateInstance <TWizardPage>(); wizard.InsertPage(index, page); return(page); }
public static TWizardPage InsertPage <TWizardPage>(this IWizard wizard, int index, object model) where TWizardPage : IWizardPage { Argument.IsNotNull(() => wizard); var typeFactory = wizard.GetTypeFactory(); var page = typeFactory.CreateInstanceWithParametersAndAutoCompletion <TWizardPage>(model); wizard.InsertPage(index, page); return(page); }