Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
StackOfTConverter.cs
Go to the documentation of this file.
2
4
5internal sealed class StackOfTConverter<TCollection, TElement> : IEnumerableDefaultConverter<TCollection, TElement> where TCollection : Stack<TElement>
6{
7 protected override void Add(in TElement value, ref ReadStack state)
8 {
9 ((TCollection)state.Current.ReturnValue).Push(value);
10 }
11
13 {
14 if (state.Current.JsonTypeInfo.CreateObject == null)
15 {
17 }
18 state.Current.ReturnValue = state.Current.JsonTypeInfo.CreateObject();
19 }
20}
override void CreateCollection(ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options)
override void Add(in TElement value, ref ReadStack state)
static void ThrowNotSupportedException_SerializationNotSupported(Type propertyType)