// 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;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Routing;
namespace Microsoft.AspNetCore.Mvc.ApplicationModels
{
///
/// A model component for routing RazorPages.
///
public class PageRouteModel
{
///
/// Initializes a new instance of .
///
/// The application relative path of the page.
/// The path relative to the base path for page discovery.
public PageRouteModel(string relativePath, string viewEnginePath)
: this(relativePath, viewEnginePath, areaName: null)
{
}
///
/// Initializes a new instance of .
///
/// The application relative path of the page.
/// The path relative to the base path for page discovery.
/// The area name.
public PageRouteModel(string relativePath, string viewEnginePath, string areaName)
{
RelativePath = relativePath ?? throw new ArgumentNullException(nameof(relativePath));
ViewEnginePath = viewEnginePath ?? throw new ArgumentNullException(nameof(viewEnginePath));
AreaName = areaName;
Properties = new Dictionary