mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Enable more analyzers and various code tweaks/cleanup (#738)
This commit is contained in:
committed by
GitHub
Unverified
parent
f3264966ff
commit
5e5761b288
@@ -33,12 +33,12 @@ public class InProcessStateTests
|
||||
|
||||
for (int i = 0; i < stateActions.Length; i++)
|
||||
{
|
||||
result[i] = CreateWrapperAsync(stateActions[i]);
|
||||
result[i] = CreateWrapper(stateActions[i]);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Func<TurnToken, IWorkflowContext, CancellationToken, ValueTask<TurnToken>> CreateWrapperAsync(Func<TState?, TState?> action)
|
||||
Func<TurnToken, IWorkflowContext, CancellationToken, ValueTask<TurnToken>> CreateWrapper(Func<TState?, TState?> action)
|
||||
{
|
||||
return
|
||||
async (turn, context, cancellation) =>
|
||||
@@ -68,7 +68,7 @@ public class InProcessStateTests
|
||||
=> currState => currState.HasValue ? currState + 1 : defaultValue;
|
||||
|
||||
private static Func<int?, int?> ValidateState(int expectedValue, string? because = null, params object[] becauseArgs)
|
||||
=> (int? currState) =>
|
||||
=> currState =>
|
||||
{
|
||||
currState.Should().Be(expectedValue, because, becauseArgs);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class InProcessStateTests
|
||||
};
|
||||
|
||||
private static Func<object?, bool> MaxTurns(int maxTurns)
|
||||
=> (object? maybeTurn) => maybeTurn is not TurnToken turn || turn.Count < maxTurns;
|
||||
=> maybeTurn => maybeTurn is not TurnToken turn || turn.Count < maxTurns;
|
||||
|
||||
[Fact]
|
||||
public async Task InProcessRun_StateShouldPersist_NotCheckpointedAsync()
|
||||
|
||||
Reference in New Issue
Block a user