Stamping / Tagging / Branding Object Instances
问题 I have a routine which accepts an object and does some processing on it. The objects may or may-not be mutable. void CommandProcessor(ICommand command) { // do a lot of things } There is a probability that the same command instance loops back in the processor. Things turn nasty when that happens. I want to detect these return visitors and prevent them from being processed. question is how can I do that transparently i.e. without disturbing the object themselves. here is what i tried Added a