Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IReadOnlyDictionaryOfTKeyTValueConverter.cs
Go to the documentation of this file.
2
4
5internal sealed class IReadOnlyDictionaryOfTKeyTValueConverter<TDictionary, TKey, TValue> : DictionaryDefaultConverter<TDictionary, TKey, TValue> where TDictionary : IReadOnlyDictionary<TKey, TValue>
6{
8
9 protected 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 override void CreateCollection(ref Utf8JsonReader reader, ref ReadStack state)
15 {
16 if (!TypeToConvert.IsAssignableFrom(RuntimeType))
17 {
19 }
21 }
22}
override void Add(TKey key, in TValue value, JsonSerializerOptions options, ref ReadStack state)
static void ThrowNotSupportedException_CannotPopulateCollection(Type type, ref Utf8JsonReader reader, ref ReadStack state)