aspnetcore/src/Microsoft.AspNet.Diagnostics/ErrorPageOptions.cs

38 lines
1.3 KiB
C#

// 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 Microsoft.AspNet.FileProviders;
namespace Microsoft.AspNet.Diagnostics
{
/// <summary>
/// Options for the ErrorPageMiddleware.
/// </summary>
public class ErrorPageOptions
{
/// <summary>
/// Create an instance with the default options settings.
/// </summary>
public ErrorPageOptions()
{
SourceCodeLineCount = 6;
}
/// <summary>
/// Determines how many lines of code to include before and after the line of code
/// present in an exception's stack frame. Only applies when symbols are available and
/// source code referenced by the exception stack trace is present on the server.
/// </summary>
public int SourceCodeLineCount { get; set; }
/// <summary>
/// Provides files containing source code used to display contextual information of an exception.
/// </summary>
/// <remarks>
/// If <c>null</c> <see cref="ErrorPageMiddleware" /> will use a <see cref="PhysicalFileProvider"/>.
/// </remarks>
public IFileProvider FileProvider { get; set; }
}
}