mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Add comment explaining unusual Throw.IfNull use for null elements inside collection
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
a43e6d993e
commit
2392255f9f
@@ -40,6 +40,7 @@ public sealed class SwitchBuilder
|
||||
|
||||
foreach (ExecutorBinding executor in executors)
|
||||
{
|
||||
// Explicit name: null element inside the collection argument.
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex++}]");
|
||||
|
||||
if (!this._executorIndicies.TryGetValue(executor.Id, out int index))
|
||||
@@ -71,6 +72,7 @@ public sealed class SwitchBuilder
|
||||
|
||||
foreach (ExecutorBinding executor in executors)
|
||||
{
|
||||
// Explicit name: null element inside the collection argument.
|
||||
Throw.IfNull(executor, $"{nameof(executors)}[{executorIndex++}]");
|
||||
|
||||
if (!this._executorIndicies.TryGetValue(executor.Id, out int index))
|
||||
|
||||
Reference in New Issue
Block a user