I'm not sure if this a common scenario or not, but I have a need along the following lines:
I have an object (I'll call it node) and this object has methods X, Y, and Z. I want to be able to have subscribers be notified if the methods are called in a specific order with specific timing (a range of time would be ideal). For instance:
- Node.X() get called
- Node.Z() is called 5 to 7 milliseconds latter
- Node.X() is called 1 to 2 milliseconds after that
- Node.Y() is called 2 milliseconds seconds after that.
- Finally, An event calling a subscriber to this sequence is fired.
Now, in this example I am simply using parameter-less methods, but in real life I'd need to be more specific about the contents of the parameters (I'd be looking for specific messages).
For reference I am using C# .net 4.
Are there any frameworks/patterns/libraries that exist out there that are built for doing this?