Example #1
0
		public HomeController(IModuleUtils moduleUtils) {
			if (_allModulesCss == null) {
				lock (_initLock) {
					if (_allModulesCss == null) {
						Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();
						_allModulesCss = string.Join(Environment.NewLine, asms.Select(x => moduleUtils.GetAssemblyCss(x)).Where(s => !Utils.IsNull(s)).ToArray());
					}
				}
			}
		}
Example #2
0
        public ActionResult GetAssemblyCss(string assemblyName)
        {
            Assembly asm;

            if (Utils.TryFindAssembly(assemblyName, out asm))
            {
                string s = moduleUtils.GetAssemblyCss(asm);
                if (s != null)
                {
                    return(Content(s, "text/css"));
                }
            }
            throw new HttpException(404, "File not found");
        }
Example #3
0
 public HomeController(IModuleUtils moduleUtils)
 {
     if (_allModulesCss == null)
     {
         lock (_initLock) {
             if (_allModulesCss == null)
             {
                 Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();
                 _allModulesCss = string.Join(Environment.NewLine, asms.Select(x => moduleUtils.GetAssemblyCss(x)).Where(s => !Utils.IsNull(s)).ToArray());
             }
         }
     }
 }