discover scoped region manager

Dec 16, 2008 at 3:05 AM
Edited Dec 16, 2008 at 2:45 PM
I am trying to use a scoped region on a view to reuse some modules.  I get the adding of a scoped region etc, and how you get a scoped region manager.

Is there an easy way to discover this scoped region manager from your global region manager.

In essence I want to look up any region managers that are scoped under the global shell region manager. 

Any ideas?  Thanks in advance.
Dec 19, 2008 at 2:28 PM

Hi

 

The current Region Manager implementation does not allow you to discover all the scoped region manager created. A possible way to get what you want could be implementing a service which maintains a reference to all the created region managers.

This service could provide an interface like the following one:

 

public class IRegionManagerDiscoverService

{

    // Register a scoped region manager with a parent region manager.

    void RegisterRegionManager(IRegionManager parentRegionManager, IRegionManager scopedRegionManager);

 

    // Get a list with all the scoped region managers registered for a parent region manager.

    IList<IRegionManager> GetScopedRegionManagers(IRegionManager parentRegionManager);

}

 

Every time that you create an scoped region, you should register its region manager in the service using the RegisterRegionManager method.

 

Please let me know if this helps.

 

Mariano Converti

http://blogs.southworks.net/mconverti
Dec 29, 2008 at 7:34 PM
Thanks for the reply.  I figured that this was going to be the case and had to implement something similar in my system.  However, I appreciate the help!