(object value)
| 162 | } |
| 163 | |
| 164 | internal static Type ResolveRuntimeType(object value) |
| 165 | { |
| 166 | Type runtimeType = value.GetType(); |
| 167 | Type? baseType = runtimeType.BaseType; |
| 168 | if (baseType is not null && |
| 169 | Attribute.IsDefined(baseType, typeof(ForyUnionAttribute), inherit: false)) |
| 170 | { |
| 171 | return baseType; |
| 172 | } |
| 173 | |
| 174 | return runtimeType; |
| 175 | } |
| 176 | |
| 177 | public static object? CastAnyDynamicValue(object? value, Type targetType) |
| 178 | { |
no test coverage detected