Skip to content

Commit 0cd1961

Browse files
committed
Small Form eimprovments
1 parent 3e8952f commit 0cd1961

4 files changed

Lines changed: 18 additions & 39 deletions

File tree

src/WGet.NET/Components/Internal/ProcessOutputReader.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// https://github.com/basicx-StrgV/ //
44
//--------------------------------------------------//
55
using System;
6-
using System.Text;
76
using System.Collections.Generic;
8-
using WGetNET.Models;
9-
using WGetNET.Helper;
7+
using System.Text;
108
using WGetNET.Builder;
119
using WGetNET.Extensions;
10+
using WGetNET.Helper;
11+
using WGetNET.Models;
1212

1313
namespace WGetNET.Components.Internal
1414
{
@@ -165,10 +165,10 @@ private static List<WinGetPackage> CreatePackageListFromOutput(string[] output,
165165
#endif
166166
}
167167
else if ((action == PackageAction.SearchBySource || action == PackageAction.InstalledListBySource)
168-
&& !string.IsNullOrWhiteSpace(sourceName) && sourceName != null)
168+
&& sourceName != null && !string.IsNullOrWhiteSpace(sourceName))
169169
{
170170
// "sourceName" source name cant't be null here because of the following check "!string.IsNullOrWhiteSpace(sourceName)".
171-
// But .NET Standard 2.0 thinks it knows better (Or I'm stupid). Therefore a second null check comes after it.
171+
// But .NET Standard 2.0 thinks it knows better (Or I'm stupid). Therefore a second null check comes befor it.
172172
builder.AddSourceName(sourceName);
173173
}
174174

src/WGet.NET/XmlDocumentation/WGet.NET.xml

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/build/Build.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// Created by basicx-StrgV //
33
// https://github.com/basicx-StrgV/ //
44
//--------------------------------------------------//
5-
using System.IO;
6-
using Serilog;
75
using Nuke.Common;
86
using Nuke.Common.IO;
97
using Nuke.Common.ProjectModel;
108
using Nuke.Common.Tools.DotNet;
9+
using Serilog;
10+
using System.IO;
1111

1212
namespace BuildTool
1313
{
@@ -53,14 +53,14 @@ internal class Build : NukeBuild
5353
.Executes(() =>
5454
{
5555
Log.Information("Loading the build config");
56-
Log.Information("File: {configFile}", _configFile);
56+
Log.Information("File: {ConfigFile}", _configFile);
5757

5858
// Check if config exist
5959
if (!File.Exists(_configFile))
6060
{
6161
if (Version != null)
6262
{
63-
Log.Warning("Config file not found. The provided version ({version}) will still be used", Version);
63+
Log.Warning("Config file not found. The provided version ({Version}) will still be used", Version);
6464
_workingVersion = Version;
6565
}
6666
else
@@ -79,7 +79,7 @@ internal class Build : NukeBuild
7979
{
8080
if (Version != null)
8181
{
82-
Log.Warning("Failed to load the config file. The provided version ({version}) will still be used", Version);
82+
Log.Warning("Failed to load the config file. The provided version ({Version}) will still be used", Version);
8383
_workingVersion = Version;
8484
}
8585
else
@@ -98,12 +98,12 @@ internal class Build : NukeBuild
9898
{
9999
if (Version != null)
100100
{
101-
Log.Warning("The version provided by the config file ({configVersion}) is invalid. The provided version ({version}) will still be used", version, Version);
101+
Log.Warning("The version provided by the config file ({ConfigVersion}) is invalid. The provided version ({Version}) will still be used", version, Version);
102102
_workingVersion = Version;
103103
}
104104
else
105105
{
106-
Log.Warning("The version provided by the config file ({configVersion}) is invalid. The version \"1.0.0\" will be used as a fallback", version);
106+
Log.Warning("The version provided by the config file ({ConfigVersion}) is invalid. The version \"1.0.0\" will be used as a fallback", version);
107107
_workingVersion = "1.0.0";
108108
}
109109

@@ -152,8 +152,8 @@ internal class Build : NukeBuild
152152
.Executes(() =>
153153
{
154154
Log.Information("Creating \"WGet.NET\" nuget package");
155-
Log.Information("Version: {version}", _workingVersion);
156-
Log.Information("Output directory: {dir}", _packages);
155+
Log.Information("Version: {Version}", _workingVersion);
156+
Log.Information("Output directory: {Dir}", _packages);
157157
});
158158

159159
Target Restore => _ => _
@@ -263,7 +263,7 @@ internal class Build : NukeBuild
263263
.Executes(() =>
264264
{
265265
Log.Information("Updating the build config");
266-
Log.Information("File: {configFile}", _configFile);
266+
Log.Information("File: {ConfigFile}", _configFile);
267267

268268
if (!File.Exists(_configFile))
269269
{

src/build/DoxygenHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
//--------------------------------------------------//
55
using Serilog;
66
using System;
7-
using System.IO;
87
using System.Diagnostics;
8+
using System.IO;
99

1010
namespace BuildTool
1111
{
@@ -40,13 +40,13 @@ public bool GenerateDocs(string projectVersion)
4040

4141
if (exitCode != 0)
4242
{
43-
Log.Error("The doxygen process failed with the exit code \"{exitCode}\"", exitCode);
43+
Log.Error("The doxygen process failed with the exit code \"{ExitCode}\"", exitCode);
4444
return false;
4545
}
4646
}
4747
catch (Exception e)
4848
{
49-
Log.Error("Exception thrown on docs generation: {ex}", e);
49+
Log.Error(e, "Exception thrown on docs generation");
5050
return false;
5151
}
5252

0 commit comments

Comments
 (0)