I have a C# class which has a dictionary inside it. The class listens asynchronously to messages that, upon arrival and processing, alter the data in the dictionary.
What is the "correct" way for an app that uses an instance of this class to iterate through the data in the dictionary? Do I have to wrap it into another class and implement some sort of enumerator? Is it appropriate to add something like Pause and Resume methods to the class that the app can call when it wants to iterate over the data?