(long InValue, Type InField)
| 47 | } |
| 48 | |
| 49 | private static object? LongToField(long InValue, Type InField) => InField switch |
| 50 | { |
| 51 | { IsValueType: false } => InValue != 0 ? InValue : null, |
| 52 | { IsEnum: true } => Enum.ToObject(InField, InValue), |
| 53 | _ when InField == typeof(nint) => (nint)InValue, |
| 54 | _ when InField == typeof(nuint) => (nuint)InValue, |
| 55 | _ => Convert.ChangeType(InValue, InField) |
| 56 | }; |
| 57 | |
| 58 | private static long FieldToLong(object? InValue) => InValue switch |
| 59 | { |
nothing calls this directly
no outgoing calls
no test coverage detected