Exemple #1
0
        public RazorPageLinkManager(ApplicationPartManager applicationPartManager, IActionDescriptorCollectionProvider actionDescriptorCollectionProvider)
        {
            this.ApplicationPartManager             = applicationPartManager;
            this.ActionDescriptorCollectionProvider = actionDescriptorCollectionProvider;

            this.RazorPageLinkDescriptors = new RazorPageLinkDescriptorCollection();

            this.Initialize();
        }
Exemple #2
0
        public RazorPageLinkDescriptorCollection GetLinkPages(Type modelType)
        {
            RazorPageLinkDescriptorCollection razorPageLinkDescriptors = new RazorPageLinkDescriptorCollection();

            foreach (RazorPageLinkDescriptor razorPageLinkDescriptor in this.RazorPageLinkDescriptors)
            {
                if (razorPageLinkDescriptor.LinkType == modelType)
                {
                    razorPageLinkDescriptors.Add(razorPageLinkDescriptor);
                }
            }

            return(razorPageLinkDescriptors);
        }