/
CommandLineSourceFile.cs
46 lines (39 loc) · 1.49 KB
/
CommandLineSourceFile.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
namespace Microsoft.CodeAnalysis
{
/// <summary>
/// Describes a source file specification stored on command line arguments.
/// </summary>
[DebuggerDisplay("{Path,nq}")]
public struct CommandLineSourceFile
{
public CommandLineSourceFile(string path, bool isScript) :
this(path, isScript, false)
{ }
public CommandLineSourceFile(string path, bool isScript, bool isInputRedirected)
{
Debug.Assert(!string.IsNullOrEmpty(path));
Path = path;
IsScript = isScript;
IsInputRedirected = isInputRedirected;
}
/// <summary>
/// Resolved absolute path of the source file (does not contain wildcards).
/// </summary>
/// <remarks>
/// Although this path is absolute it may not be normalized. That is, it may contain ".." and "." in the middle.
/// </remarks>
public string Path { get; }
/// <summary>
/// True if the input has been redirected from the standard input stream.
/// </summary>
public bool IsInputRedirected { get; }
/// <summary>
/// True if the file should be treated as a script file.
/// </summary>
public bool IsScript { get; }
}
}