Fired when a pending asynchronous navigation has completed.
Syntax
Event Data
The event handler receives an argument of type PendingEntityResolvedEventArgs containing data related to this event. The following PendingEntityResolvedEventArgs properties provide information specific to this event.
Property | Description |
---|
ResolvedEntity | The entity fetched by the asynchronous navigation. |
Example
C# | Copy Code |
---|
private OrderSummary _anOrder;
public void AsyncGetCustomerForOrder() {
DomainModelEntityManager mgr = new DomainModelEntityManager();
// Turn on async navigation. This is a readonly property in Silverlight.
mgr.UseAsyncNavigation = true;
// Assume we have an OrderSummary in cache.
// Navigate to the order's Customer property.
// If UseAsyncNavigation is true and the customer isn't already in cache
// the IsPendingEntity flag will be on.
var cust = _anOrder.Customer;
Assert.IsTrue(cust.EntityAspect.IsPendingEntity);
// Set up a handler to tell us when this entity has been retrieved.
// Note the handler is on the pending entity itself.
cust.PendingEntityResolved += PendingEntityResolvedHandler;
}
private void PendingEntityResolvedHandler(object sender, PendingEntityResolvedEventArgs args) {
// The entity has been retrieved.
Assert.IsFalse(_anOrder.Customer.EntityAspect.IsPendingEntity);
} |
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also