You need a convenient way to track objects and retrieve them by name from multiple places in your code.
Use the registry pattern, which centralizes access to a set of objects through one registry object.
A registry object acts as a repository for a collection of items that you need to identify and retrieve later. For example, you might use a registry to track all the currently loaded forms in a Microsoft Windows application. The .NET Framework does not provide any built-in method to offer this functionality.
First of all, you need to create your registry object. Clients register and unregister elements in the registry, giving them convenient names for later retrieval. The registry object shown here ...