DevForce Help Reference
Order Property (PropertyInterceptorAction)
Example 


The invocation order of the action.
Syntax
'Declaration
 
Public Property Order As Double
'Usage
 
Dim instance As PropertyInterceptorAction
Dim value As Double
 
instance.Order = value
 
value = instance.Order
public double Order {get; set;}
Remarks
The default Order is 0.0, indicating the order of execution follows the usual property interception rules (see the Developer's Guide). Set the Order to override the default. Lower values will be executed before higher values. Use the Order to control the execution sequence of a series of actions for a getter or setter.
Example
public partial class Employee {
    
  // Sample interceptors with the Order attribute set.
  // Lower values are executed before higher values.
  // Here, BeforeGetLastName2 will be executed before BeforeGetLastName3.
  
  [BeforeGet(EntityPropertyNames.LastName, Order = 3.0)]
  public static void BeforeGetLastName3(IPropertyInterceptorArgs args) {
    var emp = args.Instance as Employee;
    Console.WriteLine("emp:BeforeGetLastName3");
  }

 [BeforeGet(EntityPropertyNames.LastName, Order = 2.0)]
  public static void BeforeGetLastName2(PropertyInterceptorArgs<Employee, String> args) {
    var emp = args.Instance as Employee;
    Console.WriteLine("emp:BeforeGetLastName2");
  }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PropertyInterceptorAction Class
PropertyInterceptorAction Members

Send Feedback