-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass location information to EventArgs (#10545)
- Loading branch information
1 parent
b82694a
commit 01e53f4
Showing
8 changed files
with
111 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.Build.Shared | ||
{ | ||
/// <summary> | ||
/// Represents the location information for error reporting purposes. This is normally used to | ||
/// associate a run-time error with the original XML. | ||
/// This is not used for arbitrary errors from tasks, which store location in a BuildXXXXEventArgs. | ||
/// All implementations should be IMMUTABLE. | ||
/// Any editing of the project XML through the MSBuild API's will invalidate locations in that XML until the XML is reloaded. | ||
/// </summary> | ||
public interface IMSBuildElementLocation | ||
{ | ||
/// <summary> | ||
/// The file from which this particular element originated. It may | ||
/// differ from the ProjectFile if, for instance, it was part of | ||
/// an import or originated in a targets file. | ||
/// Should always have a value. | ||
/// If not known, returns empty string. | ||
/// </summary> | ||
string File | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// The line number where this element exists in its file. | ||
/// The first line is numbered 1. | ||
/// Zero indicates "unknown location". | ||
/// </summary> | ||
int Line | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// The column number where this element exists in its file. | ||
/// The first column is numbered 1. | ||
/// Zero indicates "unknown location". | ||
/// </summary> | ||
int Column | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// The location in a form suitable for replacement | ||
/// into a message. | ||
/// </summary> | ||
string LocationString | ||
{ | ||
get; | ||
} | ||
} | ||
} |