Skip to content

Commit

Permalink
Incremented version, removed unused method and corrected file extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eivind S. Antonsen committed Mar 22, 2024
1 parent 5fcf1ae commit 1a7f3bf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
19 changes: 0 additions & 19 deletions DetectiveSpecs/ComputerSpecSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,4 @@ private void AppendComponent(Component component)
foreach (var (key, value) in component.Properties)
stringBuilder.AppendLine($" {key.ToString().PadRight(PadLength)} {value}");
}



private void AppendComponent(IEnumerable<Component> components)
{
var array = components.ToArray();

if (array.Length == 0)
return;

var index = 1;
foreach (var component in array)
{
stringBuilder.AppendLine($"{component.ComponentType}" + (array.Length > 1 ? $"-{index}" : ""));
index++;
foreach (var (key, value) in component.Properties)
stringBuilder.AppendLine($" {key.ToString().PadRight(PadLength)} {value}");
}
}
}
2 changes: 1 addition & 1 deletion DetectiveSpecs/DetectiveSpecs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.11</Version>
<Version>1.0.12</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DetectiveSpecs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static async Task Main()
var computerSpecs = GetComputerSpecs();
var serializedText = new ComputerSpecSerializer().Serialize(computerSpecs);
var currentDirectory = AppDomain.CurrentDomain.BaseDirectory;
var path = Path.Combine(currentDirectory, "ComputerInfo");
var path = Path.Combine(currentDirectory, "ComputerInfo.txt");

await File.WriteAllTextAsync(path, serializedText).ConfigureAwait(false);

Expand Down

0 comments on commit 1a7f3bf

Please sign in to comment.