protected int ProcessStrings(ICollection <string> items) { if (items == null) { return(0); } var count = items.Count; switch (count) { case 0: return(0); case 1: return(ProcessString(items.First())); default: var action = _multLineOutput != null ? new Action(() => _multLineOutput.Write(items)) : new Action(() => OutputDevice.Write(items)); if (Dispatcher != null) { Dispatcher.BeginInvoke(action); } else { action.Invoke(); } return(count); } }
private static void gacPrint(IOutputDeviceMultiline terminal) { var result = new List <string>(); foreach (var file in GacUtil.Instance.GacFiles.Values) { result.Add($"{file.Name}\t{file.DirectoryName}"); } terminal.Write(result); }
public static void ExecuteCommandLine(IOutputDeviceMultiline output) { var result = ExecuteCommandLine(); output?.Write(result); }