IdeaBlade DevForce 2010 Help Reference
TriggerTargetNavigator Delegate
See Also  Example Send Feedback
IdeaBlade.Validation Assembly > IdeaBlade.Validation Namespace : TriggerTargetNavigator Delegate



instance
An instance of the Type
A delegate that allows navigation from a TriggerItem to the object on which the verifier is defined.

Syntax

Visual Basic (Declaration) 
Public Delegate Function TriggerTargetNavigator( _
   ByVal instance As Object _
) As Object
Visual Basic (Usage)Copy Code
Dim instance As New TriggerTargetNavigator(AddressOf HandlerMethod)
C# 
public delegate object TriggerTargetNavigator( 
   object instance
)
C++/CLI 
public delegate Object^ TriggerTargetNavigator( 
   Object^ instance
)

Parameters

instance
An instance of the Type

Return Value

An instance of the Verifier.ApplicableType

Example

C#Copy Code
// Assume a DelegateVerifier defined for Employee.  Create a trigger item for OrderSummary.OrderDate.
var item = new TriggerItem(typeof(OrderSummary), OrderSummary.PropertyMetadata.OrderDate.Name);
TriggerTargetNavigator navigator = (order) => ((OrderSummary)order).Employee;
var link = new TriggerLink(item, navigator, false);

Remarks

When doing cross-object verification, i.e., when the verification of a property on one object is affected by the value or a property on an object of another type, you need to specify a TriggerTargetNavigator to indicate the path between the types. For example, if you've defined a DelegateVerifier<T> for the Employee type to verify that the employee's HireDate is always before the OrderDate on any orders created by the employee, you will need to create a TriggerItem for the Order.OrderDate property, and then define the navigation from this item back to the Employee type with a TriggerTargetNavigator.

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.