コード例 #1
0
 void OnRequestData(RequestDataArgs request, RequestDataResult feedback)
 {
     if (RequestData != null)
     {
         RequestData(request, feedback);
     }
 }
コード例 #2
0
 internal RequestDataResult(RequestDataArgs requestArgs, RequestDataFeedback feedback)
     : base(requestArgs)
 {
     if (feedback == null)
     {
         throw new ArgumentNullException("feedback");
     }
     Feedback = feedback;
 }
        protected virtual void RaiseGetData(int skipCount, int takeCount, bool isBackgroundRequest = false)
        {
            int startIndex = Storage.IndexOfFirstNotInitializedItemOnInterval(skipCount, takeCount);
            int endIndex   = startIndex + takeCount;

            if (endIndex > Count)
            {
                endIndex = Count;
            }
            endIndex  = Storage.IndexOfFirstInitializedItemOnInterval(startIndex, endIndex - startIndex);
            skipCount = startIndex;
            takeCount = endIndex - startIndex;
            if (takeCount == 0)
            {
                return;
            }
            Storage.InitializeItemsLoading(skipCount, takeCount);
            RequestDataArgs   requestArgs   = new RequestDataArgs(skipCount, takeCount, isBackgroundRequest);
            RequestDataResult requestResult = new RequestDataResult(requestArgs, RequestDataFeedback);

            RequestData(requestArgs, requestResult);
        }
コード例 #4
0
 void OnRequestData(RequestDataArgs request, RequestDataResult feedback)
 {
     srv.GetRecordsAsync(new GetRecordsRequest(request.SkipCount, request.TakeCount), feedback);
 }