Up Property interceptors
DevForce Resource Center » Development guide » Model » Property interceptors » EntityProperties and property interceptors

EntityProperties and property interceptors

Last modified on April 05, 2017 12:14
Contents

Every property on a DevForce entity has a GetterInterceptor and a SetterInterceptor. These interceptors can be used to add or remove the actions associated with that property. Under the covers this is going through the PropertyInterceptorManager mechanism, but the syntax is often simpler. 

For example, here's a "before get" action added to the Employee.Title property getter:

C#
Employee.PropertyMetadata.Title.GetterInterceptor.AddAction(
  IbCore.PropertyInterceptorTiming.Before,
    args => args.Value = args.Value.ToUpper());
VB
Employee.PropertyMetadata.Title.GetterInterceptor.AddAction( _
  IbCore.PropertyInterceptorTiming.Before, Function(args) _
    args.Value = args.Value.ToUpper())
Created by DevForce on October 07, 2010 14:20

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