Пример #1
0
        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;
        }
Пример #2
0
		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);
 }
Пример #4
0
 public static void RegisterAreaResources(AssemblyResourceStore assemblyResourceStore)
 {
     assemblyResourceStores.Add(assemblyResourceStore.VirtualPath, assemblyResourceStore);
 }
Пример #5
0
		public void RegisterAreaEmbeddedResources()
		{
			var areaType = GetType();
            var resourceStore = new AssemblyResourceStore(areaType, "/areas/" + AreaName.ToLower(), areaType.Namespace, GetMap());
			AssemblyResourceManager.RegisterAreaResources(resourceStore);
		}