Silverlight RIA服务DomainDataSource,AutoLoad和RefreshInterval之间的关系
我无法理解 DomainDataSource.AutoLoad 之间的关系 和 DomainDataSource.RefreshInterval。
如果我为给定的 DomainDataSource 启用 AutoLoad,则会查询服务器 以非常高的速度重复...这不是我想要的。
所以我将 RefreshInterval 设置为“00:00:10”(每 10 秒一次,对吗?) 数据根本没有加载。
如果我将 AutoLoad 设置为 true,则 RefreshInterval 的值似乎不会影响任何内容。
然后是 LoadDelay 属性,该属性似乎与 AutoLoad 相关, 但将其设置为 10 秒并不会减慢对服务器的重复查询。
情况变得更糟,因为我正在尝试的应用程序是基于导航的应用程序 每次加载页面时,即使您转到应用程序中的不同页面,似乎也会同时执行更多查询。
我肯定做错了什么,但我无法弄清楚是什么,因为我无法理解这些属性的具体细节。我阅读了 MSDN 文档,但这一次它们并没有真正帮助。
我希望这不是一个含糊的问题。
I'm having trouble understanding the relation between DomainDataSource.AutoLoad
and DomainDataSource.RefreshInterval.
If I enable AutoLoad for a given DomainDataSource, the server is being queried
repeatedly at a very high rate... this is not what I want.
So I set RefreshInterval to "00:00:10" (every 10 seconds right?) but then the
data is not loaded at all.
If I set AutoLoad to true, the value of RefreshInterval does not seem to affect anything.
And then there's the LoadDelay property, that one does seem to be related to AutoLoad,
but setting this to 10 seconds does not slow down the repeated queries to the server.
It gets even worse because the application I'm trying is a Navigation based application
and every time a page gets loaded, more queries seem to be executed at the same time, even when you go to a different page within the application.
I'm definatly doing something wrong, but I can't figure out what because I fail to understand the specifics of these properties. I read the MSDN docs, but for once they didn't really help.
I'm hope it's not to vague of a question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MSDN揭示了一些亮点:
对于 RefreshInterval
所以听起来 AutoLoad 和 RefreshInterval 根本没有直接关系。需要考虑的一件事是 CanLoad 属性,在很多情况下该属性都会设置为 false。这可能是阻止您的 RefreshInterval 工作的原因。如果 DomainContext 中的任何实体有待处理的更改,则 CanLoad 会设置为 false,这种情况有时可能会在您没有意识到的情况下发生。
DDS 的真正专家是 RIA 服务团队的成员。他们在 RIA 服务论坛上闲逛的次数比这里多得多,因此询问可能有好主意。
MSDN sheds some light:
and for RefreshInterval
So it sounds like AutoLoad and RefreshInterval don't have a direct relation at all. One thing to consider is the CanLoad property, which gets set to false for many things. It may be what is preventing your RefreshInterval from working. CanLoad gets set to false if any entity in the DomainContext has pending changes, which can happen without you realizing it at times.
The real experts on DDS are members of the RIA Services team. They hang out on the RIA Services forums a lot more than here, so asking there might be a good idea.