IdeaBlade DevForce 2010 Help Reference
PendingEntityResolved Event
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityAspect Class : PendingEntityResolved Event



Fired when a pending asynchronous navigation has completed.

Syntax

Visual Basic (Declaration) 
Public Event PendingEntityResolved As EventHandler(Of PendingEntityResolvedEventArgs)
Visual Basic (Usage)Copy Code
Dim instance As EntityAspect
Dim handler As EventHandler(Of PendingEntityResolvedEventArgs)
 
AddHandler instance.PendingEntityResolved, handler
C# 
public event EventHandler<PendingEntityResolvedEventArgs> PendingEntityResolved
C++/CLI 
public:
event EventHandler<PendingEntityResolvedEventArgs^>^ PendingEntityResolved

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.

PropertyDescription
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

© 2013 All Rights Reserved.