Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Add documentation for the ConsoleWindowHider class
Browse files Browse the repository at this point in the history
  • Loading branch information
marchaen committed Oct 27, 2023
1 parent cd93251 commit 462eef4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion AKL.Cli/src/ConsoleWindowHider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ namespace AKL.Cli;

using System.Runtime.InteropServices;

// See https://stackoverflow.com/a/3571628
/// <summary>
/// Provides a single method to hide the console window.
/// </summary>
/// <seealso cref="Execute()"/>
public class ConsoleWindowHider {

// https://learn.microsoft.com/en-us/windows/console/getconsolewindow
Expand All @@ -15,6 +18,11 @@ public class ConsoleWindowHider {

const int SW_HIDE = 0;

/// <summary>
/// Hides the console host of this command line application if it is
/// currently visible.
/// </summary>
/// <seealso href="https://stackoverflow.com/a/3571628"/>
public static void Execute() {
ShowWindow(GetConsoleWindow(), SW_HIDE);
}
Expand Down

0 comments on commit 462eef4

Please sign in to comment.