IF you can, access the ShadowInfo hash directly rather than changing EVERYONE's DynamicComponent class.
See: ShadowInfo
P.S.: It would be nice if possible, to append a custom DC function, in a singleton manner, to ONLY the specific DC instance in question, rather than modify EVRYONE's set of DC functions. (But I'm not sure it can be done, the way the DCs are currently coded.)