/// <summary> /// Retrieves information about the current console selection. /// </summary> /// <returns> /// A <see cref="ConsoleSelectionInfo"/> structure that receives the selection information. /// </returns> public static ConsoleSelectionInfo GetConsoleSelectionInfo() { var lpConsoleSelectionInfo = new ConsoleSelectionInfo(); WinError.ThrowLastWin32ErrorIfFailed(GetConsoleSelectionInfo(lpConsoleSelectionInfo)); return lpConsoleSelectionInfo; }
public void GetConsoleSelectionInfo() { WinConsole.AllocConsole(); var info = new ConsoleSelectionInfo(); bool result = WinConsole.GetConsoleSelectionInfo(info); Trace.WriteLine(TestHelpers.ObjectToString(info)); Assert.That(result, Is.True); }