简体   繁体   English

.NET Compact Framework 3.5是否有BackgroundWorker替代品?

[英]Is there a BackgroundWorker replacement for .NET Compact Framework 3.5?

I want to use something similar to the BackgroundWorker , which is known from the full .NET Framework, on mobile devices. 我想在移动设备上使用类似于BackgroundWorker (从完整的.NET Framework已知)的工具。 Sadly it is not available in the compact framework. 遗憾的是,它在紧凑框架中不可用。

What can I use instead? 我该怎么用呢?

There is an MSDN site discussing the Background Processing Techniques on the CF . 有一个MSDN站点,讨论CF上的后台处理技术

The most common option is to use ThreadPool.QueueUserWorkItem instead of a BackgroundWorker, although there are other options. 最常见的选项是使用ThreadPool.QueueUserWorkItem而不是BackgroundWorker,尽管还有其他选项。

有用于CF的BackgroundWorker的实现: http : //www.danielmoth.com/Blog/2004/12/backgroundworker-sample.html

Here is an implementation that was created using Reflector . 是使用Reflector创建的实现。 You could use Reflector to check out various implementations within the .NET framework 您可以使用Reflector来检出.NET框架内的各种实现

There is a framework, called Smart Device Framework by OpenNETCF , which tries to fill the gap between the compact framework and the full .NET framework. 有一个框架,称为OpenNETCF的“智能设备框架” ,该框架试图填补紧凑型框架和完整的.NET框架之间的空白。 This framework contains and provides a BackgroundWorker implementation. 该框架包含并提供BackgroundWorker实现。

This framework is available as a community version, which can be used for free. 该框架可以作为社区版本使用,可以免费使用。

From the old version 1.x is also the source code directly available from here (scroll down to the last link). 从旧版本1.x ,源代码也可以从此处直接获得(向下滚动到最后一个链接)。 This source code is similar to the link, which @Filip Navara provided. 此源代码类似于@Filip Navara提供的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM