Skip to content

Commit 93cf220

Browse files
author
Jani Giannoudis
committed
console tool: changed user input read without key (macOS)
console program: fixed log/command setup on help mode updated version to 0.9.0-beta.7
1 parent d3248c5 commit 93cf220

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

Client.Core/ConsoleProgram.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public virtual async Task ExecuteAsync()
9999
await ShowTitleAsync();
100100
}
101101

102+
// log
103+
await SetupLogAsync();
104+
102105
// help
103106
if ((UseHelpArgument && IsHelpMode()) ||
104107
(MandatoryArgumentCount > 0 && ConsoleArguments.ParameterCount < MandatoryArgumentCount))
@@ -108,9 +111,6 @@ public virtual async Task ExecuteAsync()
108111
return;
109112
}
110113

111-
// log
112-
await SetupLogAsync();
113-
114114
// http client
115115
if (UseHttpClient() && !await SetupHttpClientAsync())
116116
{

Client.Core/ConsoleToolBase.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ namespace PayrollEngine.Client;
66
public abstract class ConsoleToolBase
77
{
88
/// <summary>Obtains the next character or function key pressed by the user</summary>
9-
/// <param name="intercept">Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false</param>
10-
public static ConsoleKeyInfo ReadKey(bool intercept) =>
11-
Console.ReadKey(intercept);
9+
public static int Read() =>
10+
Console.Read();
1211

1312
/// <summary>Wait for key input</summary>
1413
public static void PressAnyKey()
1514
{
1615
WriteLine();
1716
Write("Press any key...");
18-
ReadKey(true);
17+
Read();
1918
}
2019

2120
/// <summary>The console success foreground color</summary>

Client.Core/PayrollEngine.Client.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</None>
9090
</ItemGroup>
9191
<ItemGroup>
92-
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.6" />
92+
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.7" />
9393
</ItemGroup>
9494

9595
<!-- build json schema -->

Client.Core/PayrollEngine.Client.Core.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,8 @@
885885
<member name="T:PayrollEngine.Client.ConsoleToolBase">
886886
<summary>Tool with console operations</summary>
887887
</member>
888-
<member name="M:PayrollEngine.Client.ConsoleToolBase.ReadKey(System.Boolean)">
888+
<member name="M:PayrollEngine.Client.ConsoleToolBase.Read">
889889
<summary>Obtains the next character or function key pressed by the user</summary>
890-
<param name="intercept">Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false</param>
891890
</member>
892891
<member name="M:PayrollEngine.Client.ConsoleToolBase.PressAnyKey">
893892
<summary>Wait for key input</summary>

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>0.9.0-beta.6</Version>
5+
<Version>0.9.0-beta.7</Version>
66
<FileVersion>0.9.0</FileVersion>
77
<InformationalVersion></InformationalVersion>
88
<Authors>Jani Giannoudis</Authors>

0 commit comments

Comments
 (0)