开发者

How to get WCF RIA SupportsCancelation == true

开发者 https://www.devze.com 2023-02-14 10:53 出处:网络
Using WCF RIA Service, how can a load operation be cancelled? The S开发者_运维技巧upportsCancelation is readonly and always seems to return false.

Using WCF RIA Service, how can a load operation be cancelled? The S开发者_运维技巧upportsCancelation is readonly and always seems to return false.

Thanks


According to MSDN

true if the operation supports cancellation; otherwise, false. This implementation always returns false.

So it always returns false by default unless you have a class that overrides this behavior.

have you tried LoadOperation.Cancel() anyways ?

MyContext ctx = new MyContext();

var loadOp = ctx.Load<Entity>(ctx.GetEntities());
loadOp.Cancel();
0

精彩评论

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