Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type IFoo =
- abstract Bar : int -> bool
- type Foo () =
- interface IFoo with member foo.Bar(x) = true
- let registerAs<'TAs>(t) =
- let mi = typeof<Funq.Container>.GetMethod("RegisterAs")
- let mi = mi.MakeGenericMethod([|t;typeof<'TAs>|])
- mi.Invoke(container, [||])
- :?> Funq.IRegistration<'TAs>
- let container = new Funq.Container()
- let x = registerAs<IFoo>(typeof<Foo>)
- System.Diagnostics.Debug.WriteLine(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement