Func is a serializable class, but yet when I try to pass it as a parameter through a service. I'm told it "isn't a known type". I've tried the solutions here to no avail.
Many thanks out there...
Func is a serializable class, but yet when I try to pass it as a parameter through a service. I'm told it "isn't a known type". I've tried the solutions here to no avail.
Many thanks out there...
No, basically. You can't pass an Expression
either, since it talks to MemberInfo
nodes. Your best bet is a string representation of the predicate.
There's work happening to enable it. Check out the Expression Tree Serialization project on the MSDN Code Gallery.
Wow, what a wild question - you're essentially asking, how do I serialise functions? Which seems quite strange from an OO perspective, but is a perfectly natural question from a functional perspective.
Interesting ...
Can you return any other delegate type in WCF? I don't think so. What would it even mean?
Hi,
Could you please explain a scenario where it would be useful to expose Func in the service boundary? Sniff, Sniff... it has a certain smell to it that I wouldn't characterize as proper service-orientation.
--larsw