Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FSharpListConverter.cs
Go to the documentation of this file.
4
6
7internal sealed class FSharpListConverter<TList, TElement> : IEnumerableDefaultConverter<TList, TElement> where TList : IEnumerable<TElement>
8{
10
11 [RequiresUnreferencedCode("Uses Reflection to access FSharp.Core components at runtime.")]
13 {
14 _listConstructor = FSharpCoreReflectionProxy.Instance.CreateFSharpListConstructor<TList, TElement>();
15 }
16
17 protected override void Add(in TElement value, ref ReadStack state)
18 {
19 ((List<TElement>)state.Current.ReturnValue).Add(value);
20 }
21
26
31}
void Add(TKey key, TValue value)
override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options)
override void Add(in TElement value, ref ReadStack state)
readonly Func< IEnumerable< TElement >, TList > _listConstructor
override void CreateCollection(ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options)