task parallel library - An alternative to TaskEx.FromResult on a platform where it's not available -
i converting portable class library use different profile (78). of changes related reflection api, , have few last lines don't compile, of them using taskex.fromresult.
taskex.fromresult handy when method returns task, , value of t needs wrapped , returned method, e.g.:
public task<int> returntaskofint() { return taskex.fromresult(42); }
unfortunately taskex not available pcl profiles. perhaps shouldn't hard write replacement it, , appreciate advise.
oops, damn easy. taskex.fromresult not available, task.fromresult there.
Comments
Post a Comment