Beispiel #1
0
 public static extern bool SetConsoleHistoryInfo(ConsoleHistoryInfo lpConsoleHistoryInfo);
Beispiel #2
0
        /// <summary>
        /// Retrieves the history settings for the calling process's console.
        /// </summary>
        /// <returns>
        /// A <see cref="ConsoleHistoryInfo"/> structure with the history settings for the calling process's console.
        /// </returns>
        public static ConsoleHistoryInfo GetConsoleHistoryInfo()
        {
            var lpConsoleHistoryInfo = new ConsoleHistoryInfo();
            WinError.ThrowLastWin32ErrorIfFailed(GetConsoleHistoryInfo(lpConsoleHistoryInfo));

            return lpConsoleHistoryInfo;
        }
Beispiel #3
0
        public void GetConsoleHistoryInfo()
        {
            WinConsole.AllocConsole();

            var historyInfo = new ConsoleHistoryInfo();
            bool result = WinConsole.GetConsoleHistoryInfo(historyInfo);
            Trace.WriteLine(TestHelpers.ObjectToString(historyInfo));

            Assert.That(result, Is.True);
        }