Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ImmutableDictionaryOfTKeyTValueConverter.cs
Go to the documentation of this file.
2
4
5internal class ImmutableDictionaryOfTKeyTValueConverter<TDictionary, TKey, TValue> : DictionaryDefaultConverter<TDictionary, TKey, TValue> where TDictionary : IReadOnlyDictionary<TKey, TValue>
6{
7 internal sealed override bool CanHaveIdMetadata => false;
8
9 protected sealed override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state)
10 {
11 ((Dictionary<TKey, TValue>)state.Current.ReturnValue)[key] = value;
12 }
13
14 protected sealed override void CreateCollection(ref Utf8JsonReader reader, ref ReadStack state)
15 {
17 }
18
24}
override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state)