开发者

Could SynchronizationContext be used not in WinForms/WPF application?

I'm writing a component that would be used in WinForms or WPF applications also could be used in W开发者_Go百科indows services or Unit tests. Is there a way to use SynchronizationContext component in non UI apps?


Any (host) application can make its own SynchronizationContext class and call SynchronizationContext.SetSynchronizationContext.

Alternatively, you could make a no-op SynchronizationContext in your library, then use it whenever SynchronizationContext.Current is null.

The question talks about writing a custom SynchronizationContext.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜