protected override void StopProcessing() { if (this.Wait || this.OutputMode != OutputModeOption.None) { AvaloniaProcessBridge.CloseProcess(); } }
// 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); } }