In a Composite WPF application, what is the best way to store global variables needed by several modules? For example, I am working on an application in which several modules need to get a file name, so they can fetch the data they need from the file.
Is there a best practice for storing information like this in a Composite WPF app? How do I get the information to my modules while still keeping loose couplings? Thanks for your help
David Veeneman
Foresight Systems
Write a service that encapsulates the logic you require and package that service into a module. Then have your other modules use that service to get their job done. Note that the service may expose the file name directly, or may instead choose to expose operations that operate on an underlying file without consumers being aware of said file.