From 7b4863367547f860af62f1e2b2ad43002f363dac Mon Sep 17 00:00:00 2001 From: SergeyMenshykh Date: Mon, 9 Feb 2026 14:16:51 +0000 Subject: [PATCH] address review comments --- .../Microsoft.Agents.AI.Abstractions/AgentResponse{T}.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse{T}.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse{T}.cs index c2fa4ff51c..c46183cf0a 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse{T}.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse{T}.cs @@ -12,6 +12,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; using Microsoft.Extensions.AI; +using Microsoft.Shared.Diagnostics; namespace Microsoft.Agents.AI; @@ -28,8 +29,11 @@ public class AgentResponse : AgentResponse /// /// The from which to populate this . /// The to use when deserializing the result. + /// is . public AgentResponse(AgentResponse response, JsonSerializerOptions serializerOptions) : base(response) { + _ = Throw.IfNull(serializerOptions); + this._serializerOptions = serializerOptions; } @@ -38,8 +42,11 @@ public class AgentResponse : AgentResponse /// /// The from which to populate this . /// The to use when deserializing the result. + /// is . public AgentResponse(ChatResponse response, JsonSerializerOptions serializerOptions) : base(response) { + _ = Throw.IfNull(serializerOptions); + this._serializerOptions = serializerOptions; }