public static void CreateWizard(NewUiaWizardCommand cmdlet)
{
if (!cmdlet.ValidateWizardName(cmdlet.Name)) {
cmdlet.WriteVerbose(
cmdlet,
"The wizard name you selected is already in use");
cmdlet.WriteError(
cmdlet,
"The wizard name you selected is already in use",
"NameInUse",
ErrorCategory.InvalidArgument,
true);
}
cmdlet.WriteVerbose(cmdlet, "wizard name validated");
var wzd = new Wizard(cmdlet.Name);
cmdlet.WriteVerbose(cmdlet, "wizard object created");
wzd.StartAction = cmdlet.StartAction;
wzd.StopAction = cmdlet.StopAction;
wzd.DefaultStepForwardAction = cmdlet.DefaultStepForwardAction;
wzd.DefaultStepBackwardAction = cmdlet.DefaultStepBackwardAction;
wzd.DefaultStepCancelAction = cmdlet.DefaultStepCancelAction;
// 20130319
//wzd.DefaultStepGetWindowAction = cmdlet.DefaultStepGetWindowAction;
wzd.GetWindowAction = cmdlet.GetWindowAction;
cmdlet.WriteVerbose(cmdlet, "the wizard is fulfilled with properties");
cmdlet.WriteObject(cmdlet, wzd);
}