ProcessNodesInAssembly improvement

Jun 10, 2009 at 8:46 PM

If SiteMapNode that has been created from MethodInfo doesn't contain ParentKey then we could use SiteMapNode that was created from attribute on type. So:

  1. Store "some" (i.e. last) SiteMapNode in first foreach (over attributes on type).
  2. If some SiteMapNode in second foreach (over attributes on methods) doesn't have ParentKey specified then we use SiteMapNode from step 1.
  3. We can restrict this behaviuour to controllers only (test: typeof(System.Web.Mvc.IController).IsAsignableFrom(type);).