1 write to _jsonSerializerOptions
Microsoft.Extensions.AI (1)
ChatCompletion\DistributedCachingChatClient.cs (1)
42set => _jsonSerializerOptions = Throw.IfNull(value);
11 references to _jsonSerializerOptions
Microsoft.Extensions.AI (11)
ChatCompletion\DistributedCachingChatClient.cs (11)
41get => _jsonSerializerOptions; 49_jsonSerializerOptions.MakeReadOnly(); 53return (ChatCompletion?)JsonSerializer.Deserialize(existingJson, _jsonSerializerOptions.GetTypeInfo(typeof(ChatCompletion))); 63_jsonSerializerOptions.MakeReadOnly(); 67return (IReadOnlyList<StreamingChatCompletionUpdate>?)JsonSerializer.Deserialize(existingJson, _jsonSerializerOptions.GetTypeInfo(typeof(IReadOnlyList<StreamingChatCompletionUpdate>))); 78_jsonSerializerOptions.MakeReadOnly(); 80var newJson = JsonSerializer.SerializeToUtf8Bytes(value, _jsonSerializerOptions.GetTypeInfo(typeof(ChatCompletion))); 89_jsonSerializerOptions.MakeReadOnly(); 91var newJson = JsonSerializer.SerializeToUtf8Bytes(value, _jsonSerializerOptions.GetTypeInfo(typeof(IReadOnlyList<StreamingChatCompletionUpdate>))); 101_jsonSerializerOptions.MakeReadOnly(); 102return CachingHelpers.GetCacheKey(values, _jsonSerializerOptions);