F # Reflection of types created using TypeProvider

I created several types with type providers, they are used to create record types. In the next phase of my project, I want to use reflection to create these records. But the problem is that every type created now has a System.Object type.

So, for example, all members are of type type type. (Minlength, Email, and Required are all the type providers I created).

type UserT = {
       Name: MinLength
       email : Email
       password : Required
       }

when I use reflection later on this, I get the following result

val refl : PropertyInfo [] =
[|System.Object Name; System.Object email; System.Object password|]

Can reflection be used to get the correct type of these elements?

THX!

+4
source share

Source: https://habr.com/ru/post/1669172/


All Articles