示例#1
0
 public static void ProcessItem(object item, WaitHandle sync, BlockInformation blockInfo)
 {
     Application.Current.Dispatcher.InvokeAsync(() =>
                                                blockInfo.StartProcessing(item));
     sync.WaitOne();
     Application.Current.Dispatcher.InvokeAsync(() =>
                                                blockInfo.EndProcessing(item));
     blockInfo.Refresh();
 }