如何实现IAsyncOperationWithProgress [英] How to implement IAsyncOperationWithProgress
问题描述
我移植了一些自定义.NET流到WinRT的。语言是C#。
I'm porting some custom .NET streams to WINRT. Language is C#.
有IAsyncOperationWithProgress的一些示例实现?由于方法ReadAsync,WriteAsync从Windows.Storage.Streams需要它们。自定义WinRT的流实现也受到了欢迎。
Is there some example implementation of IAsyncOperationWithProgress? Since Methods ReadAsync, WriteAsync from Windows.Storage.Streams require them. Custom WinRT streams implementations are welcomed also.
我发现使用create_async一些C的例子,但我希望做这在C#和我找不到在新城框架create_async。
I found some C examples using create_async, but i'm looking to do this in C#, and i cannot find create_async in the Metro framework.
在此先感谢
推荐答案
有关C#中,你应该检查出的这个//建立在异步编程谈话。
For C#, you should check out this //build talk on async programming.
如果您正在使用高级C ++,你应该看看<一个href=\"http://blogs.msdn.com/b/nativeconcurrency/archive/2011/09/22/windows-8-asynchrony-with-ppl.aspx\"相对=nofollow>有关如何在PPL做异步操作此文章。
If you're using high level C++, you should look at this article about how to do asynchronous operations in the PPL.
如果您需要实现从低级别C ++自己的异步操作,你应该看的 WRL :: AsyncBase 类。
If you need to implement your own async operation from low level C++, you should look at the WRL::AsyncBase class.
这篇关于如何实现IAsyncOperationWithProgress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!