internal override void DetachDataItem() { PW.DetachFromRootItem(); if (XmlWorker != null) { XmlWorker.DetachDataItem(); } // cancel any pending async requests. If it has already completed, // but is now waiting in the dispatcher queue, it will be ignored because // we set _pending*Request to null. AsyncGetValueRequest pendingGetValueRequest = (AsyncGetValueRequest)GetValue(Feature.PendingGetValueRequest, null); if (pendingGetValueRequest != null) { pendingGetValueRequest.Cancel(); ClearValue(Feature.PendingGetValueRequest); } AsyncSetValueRequest pendingSetValueRequest = (AsyncSetValueRequest)GetValue(Feature.PendingSetValueRequest, null); if (pendingSetValueRequest != null) { pendingSetValueRequest.Cancel(); ClearValue(Feature.PendingSetValueRequest); } }
// called by the child XmlBindingWorker when there's a new raw value internal void UseNewXmlItem(object item) { PW.DetachFromRootItem(); PW.AttachToRootItem(item); if (Status != BindingStatusInternal.AsyncRequestPending) { ParentBindingExpression.ScheduleTransfer(false); } }