private static Dictionary<string, AssemblyResourceStore> InitializeAssemblyResourceStores() { var resourceStores = new Dictionary<string, AssemblyResourceStore>(); // Add default AssemblyResourceStore for input builders var inputBuildersStore = new AssemblyResourceStore(typeof(AssemblyResourceProvider), "/views/inputbuilders", "Domas.Web.Tools.UI.InputBuilder.Views.InputBuilders"); resourceStores.Add(inputBuildersStore.VirtualPath, inputBuildersStore); return resourceStores; }
public static void BootStrap() { if (!ViewEngines.Engines.Any(engine => engine.GetType().Equals(typeof(InputBuilderViewEngine)))) { VirtualPathProvider pathProvider = new AssemblyResourceProvider(); RegisterPathProvider(pathProvider); var resourceStore = new AssemblyResourceStore(typeof(PortableAreaRegistration), "/areas", typeof(PortableAreaRegistration).Namespace); AssemblyResourceManager.RegisterAreaResources(resourceStore); ViewEngines.Engines.Add(new InputBuilderViewEngine(new string[0])); } }
public AssemblyResourceVirtualFile(string virtualPath, AssemblyResourceStore resourceStore) : base(virtualPath) { this.resourceStore = resourceStore; path = VirtualPathUtility.ToAppRelative(virtualPath); }
public static void RegisterAreaResources(AssemblyResourceStore assemblyResourceStore) { assemblyResourceStores.Add(assemblyResourceStore.VirtualPath, assemblyResourceStore); }
public void RegisterAreaEmbeddedResources() { var areaType = GetType(); var resourceStore = new AssemblyResourceStore(areaType, "/areas/" + AreaName.ToLower(), areaType.Namespace, GetMap()); AssemblyResourceManager.RegisterAreaResources(resourceStore); }