public override void Initialize(string name, NameValueCollection attributes) { base.Initialize(name, attributes); rootPath = attributes["rootPath"].TrimEnd(Path.DirectorySeparatorChar); rootName = attributes["rootName"].TrimEnd(Path.DirectorySeparatorChar); if (!string.IsNullOrEmpty(attributes["filter"])) { filter = (IFileSystemSiteMapFilter)Activator.CreateInstance(Type.GetType(attributes["filter"])); } string path = HttpContext.Current.Request.ApplicationPath; directoryFactory = new FileSystemSiteMapNodeFactory(this, path + "/Directory.aspx?Path={0}"); fileFactory = new FileSystemSiteMapNodeFactory(this, path + "/File.aspx?Path={0}"); }
public FileSystemSiteMapProvider() { filter = new FileSystemSiteMapDefaultFilter(); }