Пример #1
0
        void CompleteGetValue(AsyncGetValueRequest request)
        {
            AsyncGetValueRequest pendingGetValueRequest = (AsyncGetValueRequest)GetValue(Feature.PendingGetValueRequest, null);

            if (pendingGetValueRequest == request)
            {
                ClearValue(Feature.PendingGetValueRequest);
                int k = (int)request.Args[1];

                switch (request.Status)
                {
                case AsyncRequestStatus.Completed:
                    PW.OnNewValue(k, request.Result);
                    SetStatus(PW.Status);
                    if (k == PW.Length - 1)
                    {
                        ParentBindingExpression.TransferValue(request.Result, false);
                    }
                    break;

                case AsyncRequestStatus.Failed:
                    ReportGetValueError(k, request.SourceItem, request.Exception);
                    PW.OnNewValue(k, DependencyProperty.UnsetValue);
                    break;
                }
            }
        }