.net 9 Analysis

This commit is contained in:
Adrian Conlon
2024-10-12 09:55:05 +01:00
parent f525fcf412
commit a3fd5b055a
5 changed files with 14 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ namespace Fuse
{
public ReadOnlyCollection<Register16> Registers => this.MutableRegisters.AsReadOnly();
public bool Halted { get; protected set; } = false;
public bool Halted { get; protected set; }
public int TStates { get; protected set; } = -1;
@@ -26,10 +26,15 @@ namespace Fuse
this.ParseInternalState(lines);
}
protected void ParseInternalState(Lines lines) => this.ParseInternalState(lines.ReadLine());
protected virtual void ParseInternalState(string line)
protected void ParseInternalState(Lines lines)
{
ArgumentNullException.ThrowIfNull(lines);
this.ParseInternalState(lines.ReadLine());
}
protected virtual void ParseInternalState(string? line)
{
ArgumentNullException.ThrowIfNull(line);
var tokens = line.Split(separator, StringSplitOptions.RemoveEmptyEntries);
this.ParseInternalState(tokens);
}
@@ -38,6 +43,7 @@ namespace Fuse
protected virtual void ParseExternalState(Lines lines)
{
ArgumentNullException.ThrowIfNull(lines);
var line = lines.ReadLine();
foreach (var token in line.Split(separator, StringSplitOptions.RemoveEmptyEntries))
{

View File

@@ -7,7 +7,7 @@
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<SignAssembly>False</SignAssembly>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisLevel>latest-all</AnalysisLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -24,7 +24,7 @@ namespace Fuse
{
var line = reader.ReadLine();
Debug.Assert(line != null);
var ignored = line.StartsWith(";", StringComparison.OrdinalIgnoreCase);
var ignored = line.StartsWith(';');
if (!ignored)
{
this.lines.Add(line);

View File

@@ -33,7 +33,7 @@ namespace Fuse
public byte Value { get; private set; } = (byte)EightBit.Mask.Eight;
private bool ContentionEvent { get; set; } = false;
private bool ContentionEvent { get; set; }
private static readonly char[] separator = [' ', '\t'];

View File

@@ -7,7 +7,7 @@
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<SignAssembly>False</SignAssembly>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisLevel>latest-all</AnalysisLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">