mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 18:07:21 +00:00
Adopted further C# 14 and .NET 10 features (#1158)
This commit is contained in:
1 parent
f649febf88
commit
f0fa1411c8
40 files changed
+545
-56
No files matched your search
@@ -8,7 +8,15 @@ namespace AIStudio.Tools.ERIClient;
|
||||
public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
||||
{
|
||||
protected readonly IERIDataSource DataSource = dataSource;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// How AI Studio writes its requests to an ERI server and reads the answers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// An answer which names a field twice is refused, also when the two names differ only in case:
|
||||
/// AI Studio would follow one of the values, such as the provider types a data source allows, while
|
||||
/// the server may have meant the other.
|
||||
/// </remarks>
|
||||
internal static readonly JsonSerializerOptions JSON_OPTIONS = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
@@ -17,6 +25,7 @@ public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
DictionaryKeyPolicy = JsonNamingPolicy.CamelCase,
|
||||
UnmappedMemberHandling = JsonUnmappedMemberHandling.Disallow,
|
||||
AllowDuplicateProperties = false,
|
||||
Converters =
|
||||
{
|
||||
new JsonStringEnumConverter(JsonNamingPolicy.SnakeCaseUpper),
|
||||
|
||||
Reference in new issue
Block a user