Visual Basic (Declaration) | |
---|---|
Public Delegate Function TriggerTargetNavigator( _ ByVal instance As Object _ ) As Object |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As New TriggerTargetNavigator(AddressOf HandlerMethod) |
Parameters
- instance
- An instance of the Type
Return Value
An instance of the Verifier.ApplicableTypeC# | ![]() |
---|---|
// 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); |
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.
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