Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Passing parameter into Task's Action delegate result in exception
- Task.Factory.StartNew(() => RenderThumb(UriSource)).ContinueWith((bs) =>
- {....}, TaskScheduler.FromCurrentSynchronizationConext());
- private BitmapSource RenderThumb(string uriSource)
- {
- Stream imageStream = File.OpenRead(uriSource);
- ...
- return bitmapSource;
- }
- string uriSource = UriSource;
- Task.Factory.StartNew(() => RenderThumb(uriSource )).ContinueWith((bs) =>
- {....}, TaskScheduler.FromCurrentSynchronizationConext());
- Task.Factory.StartNew(() => RenderThumb(UriSource)).ContinueWith((bs) => {....}, TaskScheduler.FromCurrentSynchronizationConext());
- Task.Factory.StartNew((s) => RenderThumb(s as String), UriSource).ContinueWith((bs) =>
- {...}, TaskScheduler.FromSynchronizationContext());
Add Comment
Please, Sign In to add comment