47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
// Copyright (c) Microsoft Open Technologies, Inc. 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 Microsoft.AspNet.FileProviders;
|
|
|
|
namespace Microsoft.AspNet.Mvc.Razor
|
|
{
|
|
/// <summary>
|
|
/// Provides programmatic configuration for the <see cref="RazorViewEngine"/>.
|
|
/// </summary>
|
|
public class RazorViewEngineOptions
|
|
{
|
|
private IFileProvider _fileProvider;
|
|
|
|
/// <summary>
|
|
/// Get a <see cref="IList{IViewLocationExpander}"/> used by the <see cref="RazorViewEngine"/>.
|
|
/// </summary>
|
|
public IList<IViewLocationExpander> ViewLocationExpanders { get; }
|
|
= new List<IViewLocationExpander>();
|
|
|
|
/// <summary>
|
|
/// Gets or sets the <see cref="IFileProvider" /> used by <see cref="RazorViewEngine"/> to locate Razor files on
|
|
/// disk.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// At startup, this is initialized to an instance of <see cref="PhysicalFileProvider"/> that is rooted at the
|
|
/// application root.
|
|
/// </remarks>
|
|
public IFileProvider FileProvider
|
|
{
|
|
get { return _fileProvider; }
|
|
|
|
set
|
|
{
|
|
if (value == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
_fileProvider = value;
|
|
}
|
|
}
|
|
}
|
|
}
|