Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FSharpTypeConverterFactory.cs
Go to the documentation of this file.
3
5
7{
9
10 [RequiresUnreferencedCode("Uses Reflection to access FSharp.Core components at runtime.")]
12 {
13 }
14
15 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "The ctor is marked with RequiresUnreferencedCode.")]
16 public override bool CanConvert(Type typeToConvert)
17 {
19 {
21 }
22 return false;
23 }
24
25 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "The ctor is marked with RequiresUnreferencedCode.")]
27 {
28 object[] args = null;
29 Type type2;
30 switch (FSharpCoreReflectionProxy.Instance.DetectFSharpKind(typeToConvert))
31 {
33 {
36 args = new object[1] { options.GetConverterInternal(type) };
37 break;
38 }
40 {
43 args = new object[1] { options.GetConverterInternal(type) };
44 break;
45 }
47 {
50 break;
51 }
53 {
56 break;
57 }
59 {
64 break;
65 }
67 {
69 return objectConverterFactory.CreateConverter(typeToConvert, options);
70 }
73 default:
74 throw new Exception();
75 }
77 }
78}
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
Definition Activator.cs:17
static string FSharpDiscriminatedUnionsNotSupported
Definition SR.cs:328
Definition SR.cs:7
override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
virtual Type[] GetGenericArguments()
Definition Type.cs:500
virtual Type MakeGenericType(params Type[] typeArguments)
Definition Type.cs:1074