x) Updated argument expressions and method overrides in multiple classes
In this commit, several changes were made across different files: - In `FSM.cs` and `Imm.cs`, the `[CallerArgumentExpression]` attribute was updated to reflect the correct argument names. - The `ProcessWork` method in `Imm.cs` was changed from virtual to override. - In `Log.cs`, the `[CallerArgumentExpression]` attribute was updated for clarity. - A new override for the `GetHashCode()` method was added in `AddressStack.cs`. - The version of "Microsoft.CodeAnalysis.CSharp" package reference was updated from 4.2.0 to 4.3.1 in 'SharpLib.csproj'. These changes improve code readability and ensure that methods are correctly overridden where necessary. Also, updating the package version ensures compatibility with newer features or bug fixes provided by Microsoft's C# compiler platform.
This commit is contained in:
parent
23017e0852
commit
b0b9496c4a
@ -22,7 +22,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
|
||||||
<PackageReference Include="Optional" Version="4.0.0" />
|
<PackageReference Include="Optional" Version="4.0.0" />
|
||||||
<PackageReference Include="Optional.Async" Version="1.3.0" />
|
<PackageReference Include="Optional.Async" Version="1.3.0" />
|
||||||
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
|
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
|
||||||
|
|||||||
@ -54,7 +54,7 @@ public record class FSM<TSUB, ST, CTX> : imm.Recorded<TSUB>, Imm
|
|||||||
[CallerMemberName] string memberName = "",
|
[CallerMemberName] string memberName = "",
|
||||||
[CallerFilePath] string filePath = "",
|
[CallerFilePath] string filePath = "",
|
||||||
[CallerLineNumber] int lineNumber = 0,
|
[CallerLineNumber] int lineNumber = 0,
|
||||||
[CallerArgumentExpression("fn")]
|
[CallerArgumentExpression("newState")]
|
||||||
string expression = default
|
string expression = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -340,7 +340,7 @@ public record class Timed<T> : Recorded<T>, imm.Imm
|
|||||||
[CallerMemberName] string dbgName = "",
|
[CallerMemberName] string dbgName = "",
|
||||||
[CallerFilePath] string dbgPath = "",
|
[CallerFilePath] string dbgPath = "",
|
||||||
[CallerLineNumber] int dbgLine = 0,
|
[CallerLineNumber] int dbgLine = 0,
|
||||||
[CallerArgumentExpression("next")]
|
[CallerArgumentExpression("fn")]
|
||||||
string dbgExp = ""
|
string dbgExp = ""
|
||||||
)
|
)
|
||||||
where U : T
|
where U : T
|
||||||
@ -358,7 +358,7 @@ public record class Timed<T> : Recorded<T>, imm.Imm
|
|||||||
)
|
)
|
||||||
=> ProcessWork( fn, reason, dbgName, dbgPath, dbgLine, dbgExp );
|
=> ProcessWork( fn, reason, dbgName, dbgPath, dbgLine, dbgExp );
|
||||||
|
|
||||||
virtual public T ProcessWork( Func<T, T> fn,
|
override public T ProcessWork( Func<T, T> fn,
|
||||||
string reason,
|
string reason,
|
||||||
string dbgName,
|
string dbgName,
|
||||||
string dbgPath,
|
string dbgPath,
|
||||||
|
|||||||
@ -45,7 +45,7 @@ public record struct Value<T>( T _val, string _exp = "" )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static public Value<U> Get<U>( U v,
|
static public Value<U> Get<U>( U v,
|
||||||
[CallerArgumentExpression("fn")]
|
[CallerArgumentExpression("v")]
|
||||||
string dbgExp = ""
|
string dbgExp = ""
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,6 +31,8 @@ namespace Tracing
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => _stack.GetHashCode();
|
||||||
|
|
||||||
public IReadOnlyList<ulong> Stack => _stack;
|
public IReadOnlyList<ulong> Stack => _stack;
|
||||||
|
|
||||||
public void AddFrame(ulong address)
|
public void AddFrame(ulong address)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user