private SiteMapNode CheckExNodeFromScanAsPartialProvider(SiteMapNodeEx nodeEx, string[] segments) { var partialProviderExtent = nodeEx.Get <SiteMapNodePartialProviderExtent>(); if (partialProviderExtent == null) { return(null); } var newProvider = GetProviderFromName(partialProviderExtent.ProviderID); string queryPart; var tightestSegments = GetUrlSegments(nodeEx.Url, out queryPart); var partialProvider = new PartialProvider { Value = tightestSegments, SiteMapProvider = newProvider, NodeEx = nodeEx }; { _partialProviderRwLock.EnterWriteLock(); if (_partialProviders == null) { _partialProviders = new List <PartialProvider>(); } _partialProviders.Add(partialProvider); _partialProviderRwLock.ExitWriteLock(); } return(DelegateFindSiteMapNodeToChildProvider(partialProvider, segments, tightestSegments)); }
public static IEnumerable <SiteMapNodeEx> GetVisibleChildNodes(this SiteMapNodeEx node) { if (node == null) { throw new ArgumentNullException("node"); } if (node.ChildNodes == null) { return new List <SiteMapNodeEx> { } } ; return(node.ChildNodes.Cast <SiteMapNodeEx>() .Where(c => c.Visible) .ToList()); } }
protected virtual SiteMapNode ExNodeFoundFromScan(SiteMapNodeEx nodeEx, string[] segments) { // locks handled by FindSiteMapNode return(CheckExNodeFromScanAsPartialProvider(nodeEx, segments)); }