2 implementations of File
Microsoft.Build (2)
ElementLocation\ElementLocation.cs (1)
37
public abstract string
File
ElementLocation\RegistryLocation.cs (1)
49
public string
File
51 references to File
Microsoft.Build (33)
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (6)
64
else if (CheckScopeClassifier.IsActionInObservedScope(_scope, context.Data.EnvironmentVariableLocation.
File
, context.Data.ProjectFilePath))
86
if (!CheckScopeClassifier.IsActionInObservedScope(_scope, context.Data.EnvironmentVariableLocation.
File
, projectPath))
113
Location.
File
== other.Location.
File
&&
120
hashCode = hashCode * 31 + (Location.
File
!= null ? Location.
File
.GetHashCode() : 0);
BuildCheck\Infrastructure\CheckScopeClassifier.cs (1)
36
=> IsActionInObservedScope(scope, location?.
File
, projectFileFullPath);
BuildEventFileInfo.cs (1)
42
: this(location.
File
, location.Line, location.Column)
Definition\ProjectProperty.cs (2)
127
EnvironmentVariableReadEventArgs args = new(Name, EvaluatedValueEscapedInternal, location.
File
, location.Line, location.Column);
134
_location = (location.
File
, location.Line, location.Column);
ElementLocation\ElementLocation.cs (1)
120
if (!String.Equals(this.File, that.
File
, StringComparison.OrdinalIgnoreCase))
Evaluation\Expander.cs (14)
600
T itemToAdd = itemFactory.CreateItem(split, elementLocation.
File
);
1694
if (elementLocation.
File
.Length == 0)
1705
value = Path.GetFileName(elementLocation.
File
);
1709
value = Path.GetFileNameWithoutExtension(elementLocation.
File
);
1713
value = FileUtilities.NormalizePath(elementLocation.
File
);
1717
value = Path.GetExtension(elementLocation.
File
);
1721
value = FileUtilities.EnsureTrailingSlash(Path.GetDirectoryName(elementLocation.
File
));
1725
string directory = Path.GetDirectoryName(elementLocation.
File
);
2169
T newItem = itemFactory.CreateItem(expandedItemVector, elementLocation.
File
);
2200
result.Add(itemFactory.CreateItem(itemSpec, elementLocation.
File
));
2205
? itemFactory.CreateItem(originalItem, elementLocation.
File
) // itemspec came from direct item reference, no transforms
2206
: itemFactory.CreateItem(itemSpec, originalItem, elementLocation.
File
)); // itemspec came from a transform and is different from its original item
4109
string startingDirectory = String.IsNullOrWhiteSpace(elementLocation.
File
) ? String.Empty : Path.GetDirectoryName(elementLocation.
File
);
Evaluation\Profiler\EvaluationProfiler.cs (1)
79
return _shouldTrackElements ? new EvaluationFrame(this, CurrentLocation.WithFileLineAndCondition(location.
File
, location.Line, condition)) : null;
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (4)
311
location?.
File
,
349
location?.
File
,
471
location.
File
,
491
location.
File
,
Instance\ProjectPropertyInstance.cs (2)
118
EnvironmentVariableReadEventArgs args = new(Name, _escapedValue, location.
File
, location.Line, location.Column);
125
_location = (location.
File
, location.Line, location.Column);
ProjectErrorUtilities.cs (1)
268
throw new InvalidProjectFileException(elementLocation.
File
, elementLocation.Line, elementLocation.Column, 0 /* Unknown end line */, 0 /* Unknown end column */, message, errorSubCategory, errorCode, helpKeyword);
Microsoft.Build.Engine.UnitTests (15)
Construction\ElementLocation_Tests.cs (14)
42
Assert.Equal("file", location.
File
);
55
Assert.Equal("file", location.
File
);
68
Assert.Equal("file", location.
File
);
169
Assert.Equal(location.
File
, deserializedLocation.
File
);
187
Assert.Equal(location.
File
, deserializedLocation.
File
);
200
Assert.Equal("file", location.
File
);
235
Assert.Equal(location.
File
, String.Empty);
245
Assert.Equal("file", location.
File
);
258
Assert.Equal("file", location.
File
);
271
Assert.Equal("file", location.
File
);
289
Assert.Equal(location.
File
, deserializedLocation.
File
);
Evaluation\ItemSpec_Tests.cs (1)
85
return new ProjectInstanceItemSpec(itemSpec, expander, location, Path.GetDirectoryName(location.
File
));
Microsoft.Build.Framework (3)
BuildCheck\BuildCheckEventArgs.cs (3)
162
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage()) =>
185
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage())
208
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage())