// 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 System.Linq;
#nullable enable
namespace Microsoft.Extensions.StackTrace.Sources
{
///
/// Contains the source code where the exception occurred.
///
internal class StackFrameSourceCodeInfo
{
///
/// Function containing instruction
///
public string? Function { get; set; }
///
/// File containing the instruction
///
public string? File { get; set; }
///
/// The line number of the instruction
///
public int Line { get; set; }
///
/// The line preceding the frame line
///
public int PreContextLine { get; set; }
///
/// Lines of code before the actual error line(s).
///
public IEnumerable PreContextCode { get; set; } = Enumerable.Empty();
///
/// Line(s) of code responsible for the error.
///
public IEnumerable ContextCode { get; set; } = Enumerable.Empty();
///
/// Lines of code after the actual error line(s).
///
public IEnumerable PostContextCode { get; set; } = Enumerable.Empty();
///
/// Specific error details for this stack frame.
///
public string? ErrorDetails { get; set; }
}
}