// This method will be called once at the end of pipeline execution; if no input is received, this method is not called protected override void EndProcessing() { base.EndProcessing(); //Return if no objects if (_psObjects.Count == 0) { return; } var TG = new TypeGetter(this); var dataTable = TG.CastObjectsToTableView(_psObjects); var applicationData = new ApplicationData { Title = Title ?? "Out-ConsoleGridView", OutputMode = OutputMode, Filter = Filter, DataTable = dataTable }; var selectedIndexes = _consoleGui.Start(applicationData); foreach (int idx in selectedIndexes) { var selectedObject = _psObjects[idx]; if (selectedObject == null) { continue; } WriteObject(selectedObject, false); } }
// This method will be called once at the end of pipeline execution; if no input is received, this method is not called protected override void EndProcessing() { base.EndProcessing(); //Return if no objects if (PSObjects.Count == 0) { return; } var TG = new TypeGetter(this); var dataTable = TG.CastObjectsToTableView(PSObjects); var applicationData = new ApplicationData { Title = Title, OutputMode = OutputMode, PassThru = PassThru, DataTable = dataTable }; AvaloniaProcessBridge.Start(applicationData); if (this.Wait || this.OutputMode != OutputModeOption.None) { AvaloniaProcessBridge.WaitForExit(); } var selectedIndexes = AvaloniaProcessBridge.SelectedIndexes; if (selectedIndexes == null) { return; } foreach (int idx in selectedIndexes) { var selectedObject = PSObjects[idx]; if (selectedObject == null) { continue; } this.WriteObject(selectedObject, false); } }
// This method will be called once at the end of pipeline execution; if no input is received, this method is not called protected override void EndProcessing() { base.EndProcessing(); //Return if no objects if (_psObjects.Count == 0) { return; } var TG = new TypeGetter(this); var dataTable = TG.CastObjectsToTableView(_psObjects); var applicationData = new ApplicationData { Title = Title ?? "Out-ConsoleGridView", OutputMode = OutputMode, PassThru = PassThru, DataTable = dataTable }; _consoleGui.Start(applicationData); // Don't write anything out to the pipeline if PassThru wasn't specified. if (!PassThru.IsPresent) { return; } var selectedIndexes = _consoleGui.SelectedIndexes; foreach (int idx in selectedIndexes) { var selectedObject = _psObjects[idx]; if (selectedObject == null) { continue; } this.WriteObject(selectedObject, false); } }