baronfel / fsharp-lang-testbed

0 stars 0 forks source link

Make reflected definitions easy to access #20

Open baronfel opened 7 years ago

baronfel commented 7 years ago

Idea 10922358: Make reflected definitions easy to access

Status : declined

Submitted by zjv on 12/1/2015 12:00:00 AM

3 votes

Given a reflected function like this: [<ReflectedDefinition(true)>] let foo (x) = ... I would like to be able to get the reflected definition like this: foo.TryGetReflectedDefinition() instead of ugly code like this (note how I had to write the method name as a string): let fooType = foo.GetType().DeclaringType.GetMethod("foo") let fooExpr = Expr.TryGetReflectedDefinition(fooType)