public IEnumerable<UIAlertAction> GetAlertActionsForCheckpoint(CheckPoint selected,Action<Command> handler,iNavigatableDialog dialog=null) { var commands = this.Commands.AsEnumerable(); if (dialog != null) commands = commands.Where(c=>c.Key!="Edit"); return commands .Select(c=>c.Value) .Where (c => c.ShouldDecorate (selected)) .Select(c=>{ if(c is IDialogBoundCommand && dialog!=null) ((IDialogBoundCommand)c).ExistingDialog=(iNavigatableDialog)dialog; return c; }) .Select (c => c.AsAlertAction (InstrumentationDecorator("Alert",c,selected,tc=>handler(tc)))); }
public AddRelativeTargetCommand(iNavigatableDialog existing) : this() { this.ExistingDialog = existing; }