Silverlight RIA Services DomainDataSource, Relationship Between AutoLoad and RefreshInterval

I am having trouble understanding the connection between DomainDataSource.AutoLoad and DomainDataSource.RefreshInterval.

If I enable AutoLoad for a given DomainDataSource, the server is queried repeatedly at a very high speed ... this is not what I want.

So, I set RefreshInterval to “00:00:10” (every 10 seconds?), But then the data doesn't load at all.

If I set AutoLoad to true, the value of RefreshInterval does not seem to affect anything.

And then the LoadDelay property seems to be related to AutoLoad, but setting this value for 10 seconds does not slow down repeated requests to the server.

This gets even worse because the application I'm trying to make is a navigation based application and every time the page loads, more requests seem to be executed at the same time, even when you go to another page in the application.

I am definitely doing something wrong, but I cannot understand, because I do not understand the specifics of these properties. I read the MSDN docs but this time they really didn't help.

I hope this is not a vague question.

+3
source share
1 answer

MSDN sheds light:

When AutoLoad is true, any property change affecting the load query
will automatically invoke a Load after the specified LoadDelay.
Examples of properties that impact the query are PageSize and
FilterOperator. Also, changes to dependency object collections, such as
FilterDescriptors and changes to the dependency properties on elements
contained in those collections, will affect the query and prompt
an automatic Load.

and for RefreshInterval

When a non-zero TimeSpan is specified, a Load operation is automatically
invoked each time the interval elapses, as long as CanLoad is true. When
this property is set, a timer starts, regardless of the value of the
AutoLoad property or whether a Load has been executed previously

, AutoLoad RefreshInterval . CanLoad, . , RefreshInterval . CanLoad false, - DomainContext , , .

DDS RIA Services. RIA Services , , , , .

+1

Source: https://habr.com/ru/post/1778121/


All Articles