mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Revert #if NET6_0_OR_GREATER back to #if NET; inline executorIndex++
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/c5655707-5b0b-44f3-98a9-5f3961e32cfe Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
f94ed16bc8
commit
a43e6d993e
@@ -40,8 +40,7 @@ public sealed class SwitchBuilder
|
||||
|
||||
foreach (ExecutorBinding executor in executors)
|
||||
{
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex}]");
|
||||
executorIndex++;
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex++}]");
|
||||
|
||||
if (!this._executorIndicies.TryGetValue(executor.Id, out int index))
|
||||
{
|
||||
@@ -72,8 +71,7 @@ public sealed class SwitchBuilder
|
||||
|
||||
foreach (ExecutorBinding executor in executors)
|
||||
{
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex}]");
|
||||
executorIndex++;
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex++}]");
|
||||
|
||||
if (!this._executorIndicies.TryGetValue(executor.Id, out int index))
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ public static class WorkflowBuilderExtensions
|
||||
|
||||
Func<object?, bool> predicate = WorkflowBuilder.CreateConditionFunc<TMessage>(IsAllowedTypeAndMatchingCondition)!;
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
#if NET
|
||||
if (targets.TryGetNonEnumeratedCount(out int count) && count == 1)
|
||||
#else
|
||||
if (targets is ICollection<ExecutorBinding> { Count: 1 })
|
||||
@@ -111,7 +111,7 @@ public static class WorkflowBuilderExtensions
|
||||
|
||||
Func<object?, bool> predicate = WorkflowBuilder.CreateConditionFunc<TMessage>((Func<object?, bool>)IsAllowedType)!;
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
#if NET
|
||||
if (targets.TryGetNonEnumeratedCount(out int count) && count == 1)
|
||||
#else
|
||||
if (targets is ICollection<ExecutorBinding> { Count: 1 })
|
||||
|
||||
Reference in New Issue
Block a user