Up Property interceptors
DevForce Resource Center » Development guide » Model » Property interceptors » Property interception mechanics

Property interception mechanics

Last modified on October 27, 2011 13:02

Property interception within DevForce is accomplished by dynamically generating compiled lamda expressions for each interceptor action. DevForce interceptors are discovered (but not compiled) as each entity class is first referenced. Runtime compilation of each property interceptor occurs lazily the first time each property is accessed. After this first access, the entire code path for each property access is fully compiled. Properties that are never accessed do not require compilation. The addition or removal of interceptor actions after they have been compiled does require a new compilation the next time the property is executed. This happens automatically.

Errors encountered during the compilation process will thus appear when a property is accessed for the first time. These exceptions will be of type PropertyInterceptorException and will contain information on the specific method that could not be compiled into a property interceptor action. These are usually a function of a PropertyInterceptorArgs parameter type that is not compatible with the property or properties being accessed.

Created by DevForce on October 07, 2010 14:21

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2020 IdeaBlade