IdeaBlade DevForce 2010 Help Reference
Order Property
See Also  Example Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace > PropertyInterceptorAttribute Class : Order Property



The invocation order of the action.

Syntax

Visual Basic (Declaration) 
Public Property Order As Double
Visual Basic (Usage)Copy Code
Dim instance As PropertyInterceptorAttribute
Dim value As Double
 
instance.Order = value
 
value = instance.Order
C# 
public double Order {get; set;}
C++/CLI 
public:
property double Order {
   double get();
   void set (    double value);
}

Example

C#Copy Code
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");
  }
}

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.

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.