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

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -