public static T Map <T>() where T : PortableAreaMap
        {
            PortableAreaMap map = null;

            if (!Maps.TryGetValue(typeof(T), out map))
            {
                map = CreateMapWithDefault <T>(map);
                Maps.Add(typeof(T), map);
            }

            return(map as T);
        }
        private static PortableAreaMap CreateMapWithDefault <T>(PortableAreaMap map) where T : PortableAreaMap
        {
            map = Activator.CreateInstance <T>();

            if (_defaultMap != null)
            {
                map.Master(_defaultMap.MasterPageLocation)
                .Title(_defaultMap.Title)
                .Body(_defaultMap.Body);
            }

            return(map);
        }
 public AssemblyResourceStore(Type typeToLocateAssembly, string virtualPath, string namespaceName,
     PortableAreaMap map)
     : this(typeToLocateAssembly, virtualPath, namespaceName)
 {
     _map = map;
 }
 public static PortableAreaMap MapAll()
 {
     _defaultMap = new PortableAreaMap();
     return(_defaultMap);
 }
 public AssemblyResourceStore(Type typeToLocateAssembly, string virtualPath, string namespaceName,
                              PortableAreaMap map)
     : this(typeToLocateAssembly, virtualPath, namespaceName)
 {
     _map = map;
 }