[ < ReflectedDefinition >
let sample (x) =
printfn "###%A" x
It seems that we can only get the function parameters, and the methodInfo stops the expression traversing. Here is a way to solve this problem:
match expression with
| Patterns.Call (expOption, mi, expList) ->
matchExp expOption
match mi with
| DerivedPatterns.MethodWithReflectedDefinition n -> recursive call to access n
| _ -> print mi
No comments:
Post a Comment