dotnetcore / EasyCaching

:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
MIT License
1.95k stars 322 forks source link

EasyCaching.Serialization.SystemTextJson 1.6.1 里的EasyCachingJsonSerializerOptions 属性都是只读的,无法设置值 #396

Closed DeliciousExtra closed 2 years ago

DeliciousExtra commented 2 years ago

Description

EasyCaching.Serialization.SystemTextJson 1.6.1 里的EasyCachingJsonSerializerOptions 属性都是只读的,无法设置值

Steps to Reproduce

  1. option.WithSystemTextJson((EasyCachingJsonSerializerOptions opt) => { },"Json");
  2. the EasyCachingJsonSerializerOptions all properties are readonly,can`t set value;
catcherwong commented 2 years ago

@DeliciousExtra Thanks for your interest in this project.

The properties of EasyCachingJsonSerializerOptions was designed to readonly.

You should use WithSystemTextJson(this EasyCachingOptions options, Action<JsonSerializerOptions> jsonSerializerSettingsConfigure, string name) to replace.

DeliciousExtra commented 2 years ago

I didnt find the usage in the document, thx for your reply,its very helpful