-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Corrected SearchInvokeValue.QueryOptions type
- Loading branch information
Tracy Boehrer
committed
Jan 29, 2025
1 parent
b0d56ce
commit 73bdbf2
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...braries/Core/Microsoft.Agents.Core/Serialization/Converters/SearchInvokeValueConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Agents.Core.Models; | ||
using System.Text.Json; | ||
|
||
namespace Microsoft.Agents.Core.Serialization.Converters | ||
{ | ||
internal class SearchInvokeValueConverter : ConnectorConverter<SearchInvokeValue> | ||
{ | ||
/// <inheritdoc/> | ||
protected override bool TryReadGenericProperty(ref Utf8JsonReader reader, SearchInvokeValue value, string propertyName, JsonSerializerOptions options) | ||
{ | ||
if (propertyName.Equals(nameof(value.Context))) | ||
{ | ||
SetGenericProperty(ref reader, data => value.Context = data, options); | ||
} | ||
else | ||
{ | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters