private void Setup() { ViewDirectories = new List <string>(); ContentDirectories = new List <string>(); if (currentSkin != null && Directory.Exists(serverUtility.MapPath(String.Format("~/Skins/{0}", currentSkin)))) { ViewDirectories.Add(String.Format("~/Skins/{0}", currentSkin)); } if (currentSkin != null && Directory.Exists(serverUtility.MapPath(String.Format("~/Skins/{0}/Content", currentSkin)))) { ContentDirectories.Add(String.Format("~/Skins/{0}/Content", currentSkin)); } var pluginFinder = new PluginFinder(); foreach (var plugin in pluginFinder.GetNames()) { if (Directory.Exists(serverUtility.MapPath(String.Format("~/Plugins/{0}/Views", plugin)))) { ViewDirectories.Add(String.Format("~/Plugins/{0}/Views", plugin)); } if (Directory.Exists(serverUtility.MapPath(String.Format("~/Plugins/{0}/Content", plugin)))) { ContentDirectories.Add(String.Format("~/Plugins/{0}/Content", plugin)); } } ViewDirectories.Add("~/Views"); ContentDirectories.Add("~/Content"); }