The PropertyInterceptorManager is a singleton, available to the developer via its CurrentInstance property. The current instance is the container for all currently registered interceptor actions. To directly add actions to the PropertyInterceptorManager, use the AddAction method. For example:
C# | PropertyInterceptorManager.CurrentInstance.AddAction( new PropertyInterceptorAction<PropertyInterceptorArgs<Entity,Object>>( typeof(Entity), null, PropertyInterceptorMode.BeforeSet, (args) => Debug.WriteLine("Entity BeforeSet"), 0.0, "A") ); |
VB | PropertyInterceptorManager.CurrentInstance.AddAction( _ New PropertyInterceptorAction(Of PropertyInterceptorArgs(Of Entity, Object)) _ (GetType(Entity), Nothing, PropertyInterceptorMode.BeforeSet, _ Function(args) Debug.WriteLine("Entity BeforeSet"), 0.0, "A")) |