.NET: Clean / address some message warnings (#291)

* WIP

* Structured Output sample

* Update dotnet/samples/GettingStarted/Steps/Step06_ChatClientAgent_StructuredOutputs.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Address xml and comment targeting the Structured Output context

* Update with proposed fix for Persistent ChatClient

* Address PR feedback

* Address minor warnings

* Address initialization

* Address initialization

* Address PR comments, update suggestions

* Revert changes to NullableAttributese.cs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
This commit is contained in:
Roger Barreto
2025-08-05 13:55:44 +01:00
committed by GitHub
Unverified
parent cbb05e210f
commit 9faa27b8eb
19 changed files with 63 additions and 73 deletions
@@ -509,6 +509,7 @@ namespace Azure.AI.Agents.Persistent
// We need to extract the run ID and ensure that the ToolOutput we send back to Azure
// is only the call ID.
string[]? runAndCallIDs;
#pragma warning disable CA1031 // Do not catch general exception types
try
{
runAndCallIDs = JsonSerializer.Deserialize(frc.CallId, AgentsChatClientJsonContext.Default.StringArray);
@@ -517,6 +518,7 @@ namespace Azure.AI.Agents.Persistent
{
continue;
}
#pragma warning restore CA1031 // Do not catch general exception types
if (runAndCallIDs is null ||
runAndCallIDs.Length != 2 ||