// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using Microsoft.Framework.Internal; namespace Microsoft.AspNet.Mvc.Razor { /// /// Represents the results of locating a . /// public class RazorPageResult { /// /// Initializes a new instance of for a successful discovery. /// /// The name of the page that was located. /// The located . public RazorPageResult([NotNull] string name, [NotNull] IRazorPage page) { Name = name; Page = page; } /// /// Initializes a new instance of for an unsuccessful discovery. /// /// The name of the page that was located. /// The locations that were searched. public RazorPageResult([NotNull] string name, [NotNull] IEnumerable searchedLocations) { Name = name; SearchedLocations = searchedLocations; } /// /// Gets the name of the page being located. /// /// This property maps to the name parameter of /// . public string Name { get; } /// /// Gets the if found. /// /// This property is null if the page was not found. public IRazorPage Page { get; } /// /// Gets the locations that were searched when could not be located. /// /// This property is null if the page was found. public IEnumerable SearchedLocations { get; } } }