3 types derived from ElementLocation
Microsoft.Build (2)
ElementLocation\ElementLocation.cs (2)
230private class RegularElementLocation : ElementLocation 306private class SmallElementLocation : ElementLocation
Microsoft.Build.Engine.UnitTests (1)
MockElementLocation.cs (1)
13public class MockElementLocation : ElementLocation
668 references to ElementLocation
CustomCheck (2)
Check1.cs (1)
48ElementLocation.EmptyLocation,
Check2.cs (1)
37ElementLocation.EmptyLocation,
CustomCheck2 (1)
Check3.cs (1)
37ElementLocation.EmptyLocation,
ErrorCustomCheck (2)
ErrorOnInitializeCheck.cs (1)
39ElementLocation.EmptyLocation,
ErrorWhenRegisteringActions.cs (1)
39ElementLocation.EmptyLocation,
Microsoft.Build (455)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
903new BuildEventFileInfo(Construction.ElementLocation.EmptyLocation));
BackEnd\Components\RequestBuilder\BatchingEngine.cs (6)
11using ElementLocation = Microsoft.Build.Construction.ElementLocation; 84ElementLocation elementLocation, 105ElementLocation elementLocation, 211ElementLocation elementLocation) 304ElementLocation elementLocation, 390ElementLocation elementLocation)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (3)
16using ElementLocation = Microsoft.Build.Construction.ElementLocation; 518private HashSet<string> EvaluateExcludePaths(IReadOnlyList<string> excludes, ElementLocation excludeLocation) 549ElementLocation specificationLocation,
BackEnd\Components\RequestBuilder\ITargetBuilderCallback.cs (3)
6using ElementLocation = Microsoft.Build.Construction.ElementLocation; 22/// <param name="referenceLocation">The <see cref="ElementLocation"/> of the reference.</param> 35Task<ITargetResult[]> LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (4)
16using ElementLocation = Microsoft.Build.Construction.ElementLocation; 236/// <param name="taskLocation">The <see cref="ElementLocation"/> of the task.</param> 244async Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation taskLocation) 677ElementLocation targetLocation = targetSpecification.ReferenceLocation;
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
18using ElementLocation = Microsoft.Build.Construction.ElementLocation; 209internal ElementLocation ReferenceLocation 593ElementLocation targetReturnsLocation = _target.ReturnsLocation;
BackEnd\Components\RequestBuilder\TargetSpecification.cs (5)
7using ElementLocation = Microsoft.Build.Construction.ElementLocation; 20private ElementLocation _referenceLocation; 30internal TargetSpecification(string targetName, ElementLocation referenceLocation, TargetBuiltReason targetBuiltReason = TargetBuiltReason.None) 54public ElementLocation ReferenceLocation => _referenceLocation; 59translator.Translate(ref _referenceLocation, ElementLocation.FactoryForDeserialization);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
15using ElementLocation = Microsoft.Build.Construction.ElementLocation; 799ElementLocation elementLocation)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (4)
25using ElementLocation = Microsoft.Build.Construction.ElementLocation; 249foreach (KeyValuePair<string, (string, ElementLocation)> taskParameter in _taskNode.ParametersForBuild) 524string msbuildArchitecture = expander.ExpandIntoStringAndUnescape(_taskNode.MSBuildArchitecture ?? String.Empty, ExpanderOptions.ExpandAll, _taskNode.MSBuildArchitectureLocation ?? ElementLocation.EmptyLocation); 525string msbuildRuntime = expander.ExpandIntoStringAndUnescape(_taskNode.MSBuildRuntime ?? String.Empty, ExpanderOptions.ExpandAll, _taskNode.MSBuildRuntimeLocation ?? ElementLocation.EmptyLocation);
BackEnd\Components\RequestBuilder\TaskHost.cs (4)
24using ElementLocation = Microsoft.Build.Construction.ElementLocation; 60private ElementLocation _taskLocation; 113/// <param name="taskLocation">The <see cref="ElementLocation"/> of the task.</param> 115public TaskHost(IBuildComponentHost host, BuildRequestEntry requestEntry, ElementLocation taskLocation, ITargetBuilderCallback targetBuilderCallback)
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (3)
75internal override IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 84internal override IReadOnlyList<SdkResolverManifest> GetResolversManifests(ElementLocation location) 93protected internal override IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location)
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (1)
38public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (1)
52public abstract SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\ISdkResolverService.cs (2)
40/// <param name="sdkReferenceLocation">The <see cref="ElementLocation"/> of the element which referenced the SDK.</param> 47SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
99public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (2)
67public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 118private SdkResult RequestSdkPathFromMainNode(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (7)
46internal virtual IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 75internal virtual IReadOnlyList<SdkResolverManifest> GetResolversManifests(ElementLocation location) 98internal virtual IReadOnlyList<string> FindPotentialSdkResolvers(string rootFolder, ElementLocation location) 105internal virtual IReadOnlyList<SdkResolverManifest> FindPotentialSdkResolversManifests(string rootFolder, ElementLocation location) 176private bool TryAddAssemblyManifestFromXml(string pathToManifest, string manifestFolder, List<SdkResolverManifest> manifestsList, ElementLocation location) 255protected internal virtual IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location) 270protected virtual void LoadResolvers(string resolverPath, ElementLocation location, List<SdkResolver> resolvers)
BackEnd\Components\SdkResolution\SdkResolverRequest.cs (5)
18private ElementLocation _elementLocation; 33private SdkResolverRequest(int submissionId, string name, string version, string minimumVersion, BuildEventContext buildEventContext, ElementLocation elementLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio) 49public ElementLocation ElementLocation => _elementLocation; 71public static SdkResolverRequest Create(int submissionId, SdkReference sdkReference, BuildEventContext buildEventContext, ElementLocation elementLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio) 84translator.Translate(ref _elementLocation, ElementLocation.FactoryForDeserialization);
BackEnd\Components\SdkResolution\SdkResolverService.cs (6)
111public virtual SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 170private SdkResult ResolveSdkUsingResolversWithPatternsFirst(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 261private List<SdkResolver> GetResolvers(IList<SdkResolverManifest> resolversManifests, LoggingContext loggingContext, ElementLocation sdkReferenceLocation) 292ElementLocation sdkReferenceLocation, 422private static void LogWarnings(LoggingContext loggingContext, ElementLocation location, IEnumerable<string> warnings) 460private void RegisterResolversManifests(ElementLocation location)
BackEnd\Components\SdkResolution\SdkResult.cs (1)
76public Construction.ElementLocation ElementLocation { get; set; }
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (11)
113private ElementLocation _taskLocation; 245public void InitializeForTask(IBuildEngine2 buildEngine, TargetLoggingContext loggingContext, ProjectInstance projectInstance, string taskName, ElementLocation taskLocation, ITaskHost taskHost, bool continueOnError, 353public bool SetTaskParameters(IDictionary<string, (string, ElementLocation)> parameters) 365foreach (KeyValuePair<string, (string, ElementLocation)> parameter in parameters) 424public bool GatherTaskOutputs(string parameterName, ElementLocation parameterLocation, bool outputTargetIsItem, string outputTargetName) 725private bool SetParameterArray(TaskPropertyInfo parameter, Type parameterType, IList<TaskItem> taskItems, ElementLocation parameterLocation) 1006ElementLocation parameterLocation, 1135ElementLocation parameterLocation, 1259ElementLocation parameterLocation, 1369private void GatherTaskItemOutputs(bool outputTargetIsItem, string outputTargetName, ITaskItem[] outputs, ElementLocation parameterLocation, TaskPropertyInfo parameter) 1507private void GatherArrayStringAndValueOutputs(bool outputTargetIsItem, string outputTargetName, string[] outputs, ElementLocation parameterLocation, TaskPropertyInfo parameter)
BuildCheck\Checks\PreferProjectReferenceCheck.cs (2)
74ElementLocation.EmptyLocation, 102ElementLocation.EmptyLocation,
BuildCheck\Checks\SharedOutputPathCheck.cs (1)
80ElementLocation.EmptyLocation,
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
437ElementLocation.Create(evr.File, evr.LineNumber, evr.ColumnNumber));
BuildCheck\Infrastructure\BuildEventsProcessor.cs (2)
136ElementLocation invocationLocation = ElementLocation.Create(
BuildCheck\OM\ParsedItemsCheckData.cs (2)
141ElementLocation taskInvocationLocation, 156public ElementLocation TaskInvocationLocation { get; }
BuildEventFileInfo.cs (1)
17internal static BuildEventFileInfo Empty = new BuildEventFileInfo(ElementLocation.EmptyLocation);
Construction\ProjectChooseElement.cs (1)
80public override ElementLocation ConditionLocation
Construction\ProjectElement.cs (4)
279public virtual ElementLocation ConditionLocation => GetAttributeLocation(XMakeAttributes.condition); 285public ElementLocation LabelLocation => GetAttributeLocation(XMakeAttributes.label); 294public ElementLocation Location => Link != null ? Link.Location : XmlElement.Location; 534internal ElementLocation GetAttributeLocation(string attributeName)
Construction\ProjectExtensionsElement.cs (1)
87public override ElementLocation ConditionLocation
Construction\ProjectImportElement.cs (2)
67public ElementLocation ProjectLocation => GetAttributeLocation(XMakeAttributes.project); 118public ElementLocation SdkLocation => GetAttributeLocation(XMakeAttributes.sdk);
Construction\ProjectItemElement.cs (9)
291public ElementLocation IncludeLocation => GetAttributeLocation(XMakeAttributes.include); 296public ElementLocation ExcludeLocation => GetAttributeLocation(XMakeAttributes.exclude); 301public ElementLocation RemoveLocation => GetAttributeLocation(XMakeAttributes.remove); 306public ElementLocation UpdateLocation => GetAttributeLocation(XMakeAttributes.update); 311public ElementLocation MatchOnMetadataLocation => GetAttributeLocation(XMakeAttributes.matchOnMetadata); 316public ElementLocation MatchOnMetadataOptionsLocation => GetAttributeLocation(XMakeAttributes.matchOnMetadataOptions); 321public ElementLocation KeepMetadataLocation => GetAttributeLocation(XMakeAttributes.keepMetadata); 326public ElementLocation RemoveMetadataLocation => GetAttributeLocation(XMakeAttributes.removeMetadata); 331public ElementLocation KeepDuplicatesLocation => GetAttributeLocation(XMakeAttributes.keepDuplicates);
Construction\ProjectMetadataElement.cs (1)
103internal static ProjectMetadataElement CreateDisconnected(string name, ProjectRootElement containingProject, ElementLocation location = null)
Construction\ProjectOnErrorElement.cs (1)
68public ElementLocation ExecuteTargetsLocation => GetAttributeLocation(XMakeAttributes.executeTargets);
Construction\ProjectOtherwiseElement.cs (1)
75public override ElementLocation ConditionLocation
Construction\ProjectOutputElement.cs (3)
121public ElementLocation TaskParameterLocation => GetAttributeLocation(XMakeAttributes.taskParameter); 126public ElementLocation PropertyNameLocation => GetAttributeLocation(XMakeAttributes.propertyName); 131public ElementLocation ItemTypeLocation => GetAttributeLocation(XMakeAttributes.itemName);
Construction\ProjectRootElement.cs (13)
108private ElementLocation _projectFileLocation; 418_projectFileLocation = ElementLocation.Create(newFullPath); 628public override ElementLocation ConditionLocation 642public ElementLocation ProjectFileLocation => Link != null ? RootLink.ProjectFileLocation : _projectFileLocation ?? ElementLocation.EmptyLocation; 647public ElementLocation ToolsVersionLocation => GetAttributeLocation(XMakeAttributes.toolsVersion); 652public ElementLocation DefaultTargetsLocation => GetAttributeLocation(XMakeAttributes.defaultTargets); 657public ElementLocation InitialTargetsLocation => GetAttributeLocation(XMakeAttributes.initialTargets); 662public ElementLocation SdkLocation => GetAttributeLocation(XMakeAttributes.sdk); 667public ElementLocation TreatAsLocalPropertyLocation => GetAttributeLocation(XMakeAttributes.treatAsLocalProperty); 1338public ProjectMetadataElement CreateMetadataElement(string name, string unevaluatedValue, ElementLocation location) 1792internal XmlElementWithLocation CreateElement(string name, ElementLocation location = null) 2072_projectFileLocation = ElementLocation.Create(fullPath);
Construction\ProjectTargetElement.cs (9)
293public ElementLocation NameLocation => GetAttributeLocation(XMakeAttributes.name); 298public ElementLocation InputsLocation => GetAttributeLocation(XMakeAttributes.inputs); 303public ElementLocation OutputsLocation => GetAttributeLocation(XMakeAttributes.outputs); 308public ElementLocation KeepDuplicateOutputsLocation 312ElementLocation location = GetAttributeLocation(XMakeAttributes.keepDuplicateOutputs); 327public ElementLocation DependsOnTargetsLocation => GetAttributeLocation(XMakeAttributes.dependsOnTargets); 332public ElementLocation BeforeTargetsLocation => GetAttributeLocation(XMakeAttributes.beforeTargets); 337public ElementLocation ReturnsLocation => GetAttributeLocation(XMakeAttributes.returns); 342public ElementLocation AfterTargetsLocation => GetAttributeLocation(XMakeAttributes.afterTargets);
Construction\ProjectTaskElement.cs (12)
36private CopyOnWriteDictionary<(string, ElementLocation)> _parameters; 151foreach (KeyValuePair<string, (string, ElementLocation)> entry in _parameters) 166public IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations 178var parameterLocations = new List<KeyValuePair<string, ElementLocation>>(); 180foreach (KeyValuePair<string, (string, ElementLocation)> entry in _parameters) 182parameterLocations.Add(new KeyValuePair<string, ElementLocation>(entry.Key, entry.Value.Item2)); 194public ElementLocation ContinueOnErrorLocation => GetAttributeLocation(XMakeAttributes.continueOnError); 200public ElementLocation MSBuildRuntimeLocation => GetAttributeLocation(XMakeAttributes.msbuildRuntime); 206public ElementLocation MSBuildArchitectureLocation => GetAttributeLocation(XMakeAttributes.msbuildArchitecture); 211internal CopyOnWriteDictionary<(string, ElementLocation)> ParametersForEvaluation 303if (_parameters.TryGetValue(name, out (string, ElementLocation) parameter)) 444_parameters = new CopyOnWriteDictionary<(string, ElementLocation)>(StringComparer.OrdinalIgnoreCase);
Construction\ProjectUsingTaskBodyElement.cs (2)
107public override ElementLocation ConditionLocation 121public ElementLocation EvaluateLocation => GetAttributeLocation(XMakeAttributes.evaluate) ?? Location;
Construction\ProjectUsingTaskElement.cs (7)
172public ElementLocation TaskNameLocation => GetAttributeLocation(XMakeAttributes.taskName); 177public ElementLocation AssemblyFileLocation => GetAttributeLocation(XMakeAttributes.assemblyFile); 182public ElementLocation AssemblyNameLocation => GetAttributeLocation(XMakeAttributes.assemblyName); 187public ElementLocation RuntimeLocation => GetAttributeLocation(XMakeAttributes.runtime); 192public ElementLocation ArchitectureLocation => GetAttributeLocation(XMakeAttributes.architecture); 197public ElementLocation TaskFactoryLocation => GetAttributeLocation(XMakeAttributes.taskFactory); 202public ElementLocation OverrideLocation => GetAttributeLocation(XMakeAttributes.overrideUsingTask);
Construction\ProjectUsingTaskParameterElement.cs (4)
138public override ElementLocation ConditionLocation 152public ElementLocation ParameterTypeLocation => GetAttributeLocation(XMakeAttributes.parameterType) ?? Location; 159public ElementLocation OutputLocation => GetAttributeLocation(XMakeAttributes.output) ?? Location; 166public ElementLocation RequiredLocation => GetAttributeLocation(XMakeAttributes.required) ?? Location;
Construction\UsingTaskParameterGroupElement.cs (1)
65public override ElementLocation ConditionLocation
Definition\Project.cs (11)
814public ElementLocation ProjectFileLocation => Xml.ProjectFileLocation; 1747internal string ExpandPropertyValueBestEffortLeaveEscaped(string unevaluatedValue, ElementLocation propertyLocation) 1777internal string ExpandMetadataValueBestEffortLeaveEscaped(IMetadataTable metadataTable, string unevaluatedValue, ElementLocation metadataLocation) 2468public ElementLocation ProjectFileLocation => Xml.ProjectFileLocation; 3501public string ExpandPropertyValueBestEffortLeaveEscaped(string unevaluatedValue, ElementLocation propertyLocation) 3555public string ExpandMetadataValueBestEffortLeaveEscaped(IMetadataTable metadataTable, string unevaluatedValue, ElementLocation metadataLocation) 3970string ExpandPropertyValueBestEffortLeaveEscaped(string unevaluatedValue, ElementLocation propertyLocation); 3974string ExpandMetadataValueBestEffortLeaveEscaped(IMetadataTable metadataTable, string unevaluatedValue, ElementLocation metadataLocation); 3995public string ExpandPropertyValueBestEffortLeaveEscaped(string unevaluatedValue, ElementLocation propertyLocation) { throw new NotImplementedException(); } 3999public string ExpandMetadataValueBestEffortLeaveEscaped(IMetadataTable metadataTable, string unevaluatedValue, ElementLocation metadataLocation) { throw new NotImplementedException(); } 4289ElementLocation toolsVersionLocation = Project.Xml.ProjectFileLocation;
Definition\ProjectCollection.cs (1)
355ProjectErrorUtilities.ThrowInvalidProject(ElementLocation.Create("MSBUILD"), "InvalidProperty", ex.Message);
Definition\ProjectMetadata.cs (2)
223public ElementLocation Location 231public ElementLocation ConditionLocation
Definition\ToolsetConfigurationReader.cs (5)
88ElementLocation location = ElementLocation.Create( 142InvalidToolsetDefinitionException.Throw(ex, "ConfigFileReadError", ElementLocation.Create(ex.Source, ex.Line, 0).LocationString, ex.BareMessage); 168ElementLocation location = ElementLocation.Create(propertyElement.ElementInformation.Source, propertyElement.ElementInformation.LineNumber, 0);
ElementLocation\ElementLocation.cs (7)
28private static ElementLocation s_emptyElementLocation = new SmallElementLocation(null, 0, 0); 83public static ElementLocation EmptyLocation 157internal static ElementLocation FactoryForDeserialization(ITranslator translator) 174internal static ElementLocation Create(string file) 188public static ElementLocation Create(string file, int line, int column) 196? new ElementLocation.SmallElementLocation(file, line, column) 197: new ElementLocation.RegularElementLocation(file, line, column);
ElementLocation\XmlAttributeWithLocation.cs (4)
20private ElementLocation _elementLocation; 38_elementLocation = ElementLocation.Create(documentWithLocation.FullPath, lineNumber, columnNumber); 71internal ElementLocation Location 79_elementLocation = ElementLocation.Create(ownerDocumentWithLocation.FullPath, _elementLocation.Line, _elementLocation.Column);
ElementLocation\XmlDocumentWithLocation.cs (3)
59private readonly AsyncLocal<ElementLocation> _elementLocation = new AsyncLocal<ElementLocation>(); 178internal XmlElement CreateElement(string localName, string namespaceURI, ElementLocation location)
ElementLocation\XmlElementWithLocation.cs (5)
27private ElementLocation _elementLocation; 50_elementLocation = ElementLocation.Create(documentWithLocation.FullPath, lineNumber, adjustedColumn); 91internal ElementLocation Location 99_elementLocation = ElementLocation.Create(ownerDocumentWithLocation.FullPath, _elementLocation.Line, _elementLocation.Column); 151internal ElementLocation GetAttributeLocation(string name)
Evaluation\Conditionals\Parser.cs (3)
8using ElementLocation = Microsoft.Build.Construction.ElementLocation; 47private ElementLocation _elementLocation; 98internal GenericExpressionNode Parse(string expression, ParserOptions optionSettings, ElementLocation elementLocation)
Evaluation\ConditionEvaluator.cs (6)
13using ElementLocation = Microsoft.Build.Construction.ElementLocation; 188ElementLocation elementLocation, 222ElementLocation elementLocation, 346ElementLocation ElementLocation { get; } 401public ElementLocation ElementLocation { get; } 426ElementLocation elementLocation,
Evaluation\Evaluator.cs (2)
1974ElementLocation importLocationInProject = importElement.Location; 2579private void VerifyVSDistributionPath(string path, ElementLocation importLocationInProject)
Evaluation\ProjectParser.cs (1)
134ProjectErrorUtilities.ThrowInvalidProject(ElementLocation.Create(_document.FullPath), "NoRootProjectElement", XMakeElements.project);
Graph\ProjectGraph.cs (1)
679ElementLocation.Create(Solution.FullPath),
Instance\IPropertyElementWithLocation.cs (1)
26ElementLocation Location { get; }
Instance\ProjectInstance.cs (19)
153private ElementLocation _projectFileLocation; 375_projectFileLocation = ElementLocation.Create(projectPath); 432_projectFileLocation = ElementLocation.Create(projectPath); 534_projectFileLocation = ElementLocation.Create(projectFile); 648_projectFileLocation = ElementLocation.Create(fullPath); 1477public ElementLocation ProjectFileLocation 1911new PropertyReadInfo(name, ElementLocation.EmptyLocation, false, PropertyReadContext.Other)); 1932_loggingContext?.ProcessPropertyWrite(new PropertyWriteInfo(name, false, ElementLocation.EmptyLocation)); 2419translator.Translate(ref _projectFileLocation, ElementLocation.FactoryForDeserialization); 2825String.IsNullOrEmpty(condition) ? null : ElementLocation.EmptyLocation, 2826String.IsNullOrEmpty(inputs) ? null : ElementLocation.EmptyLocation, 2827String.IsNullOrEmpty(outputs) ? null : ElementLocation.EmptyLocation, 2828String.IsNullOrEmpty(returns) ? null : ElementLocation.EmptyLocation, 2829String.IsNullOrEmpty(keepDuplicateOutputs) ? null : ElementLocation.EmptyLocation, 2830String.IsNullOrEmpty(dependsOnTargets) ? null : ElementLocation.EmptyLocation, 2831String.IsNullOrEmpty(beforeTargets) ? null : ElementLocation.EmptyLocation, 2832String.IsNullOrEmpty(afterTargets) ? null : ElementLocation.EmptyLocation, 3089_projectFileLocation = xml.ProjectFileLocation ?? ElementLocation.EmptyLocation; 3107ElementLocation toolsVersionLocation = xml.Location;
Instance\ProjectItemGroupTaskInstance.cs (8)
36private ElementLocation _location; 41private ElementLocation _conditionLocation; 49ElementLocation location, 50ElementLocation conditionLocation, 105public override ElementLocation Location 113public override ElementLocation ConditionLocation 136translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 137translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectItemGroupTaskItemInstance.cs (40)
75private ElementLocation _location; 80private ElementLocation _includeLocation; 85private ElementLocation _excludeLocation; 90private ElementLocation _removeLocation; 95private ElementLocation _matchOnMetadataLocation; 100private ElementLocation _matchOnMetadataOptionsLocation; 105private ElementLocation _keepMetadataLocation; 110private ElementLocation _removeMetadataLocation; 115private ElementLocation _keepDuplicatesLocation; 120private ElementLocation _conditionLocation; 150ElementLocation location, 151ElementLocation includeLocation, 152ElementLocation excludeLocation, 153ElementLocation removeLocation, 154ElementLocation matchOnMetadataLocation, 155ElementLocation matchOnMetadataOptionsLocation, 156ElementLocation keepMetadataLocation, 157ElementLocation removeMetadataLocation, 158ElementLocation keepDuplicatesLocation, 159ElementLocation conditionLocation, 336public ElementLocation Location 346public ElementLocation IncludeLocation 356public ElementLocation ExcludeLocation 366public ElementLocation RemoveLocation 376public ElementLocation MatchOnMetadataLocation 386public ElementLocation MatchOnMetadataOptionsLocation 396public ElementLocation KeepMetadataLocation 406public ElementLocation RemoveMetadataLocation 416public ElementLocation KeepDuplicatesLocation 426public ElementLocation ConditionLocation 453translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 454translator.Translate(ref _includeLocation, ElementLocation.FactoryForDeserialization); 455translator.Translate(ref _excludeLocation, ElementLocation.FactoryForDeserialization); 456translator.Translate(ref _removeLocation, ElementLocation.FactoryForDeserialization); 457translator.Translate(ref _keepMetadataLocation, ElementLocation.FactoryForDeserialization); 458translator.Translate(ref _removeMetadataLocation, ElementLocation.FactoryForDeserialization); 459translator.Translate(ref _keepDuplicatesLocation, ElementLocation.FactoryForDeserialization); 460translator.Translate(ref _matchOnMetadataLocation, ElementLocation.FactoryForDeserialization); 461translator.Translate(ref _matchOnMetadataOptionsLocation, ElementLocation.FactoryForDeserialization); 462translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectItemGroupTaskMetadataInstance.cs (8)
38private ElementLocation _location; 43private ElementLocation _conditionLocation; 48internal ProjectItemGroupTaskMetadataInstance(string name, string value, string condition, ElementLocation location, ElementLocation conditionLocation) 110public ElementLocation Location 120public ElementLocation ConditionLocation 140translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 141translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectItemInstance.cs (1)
1340return expander.ExpandIntoStringLeaveEscaped(metadatum.EvaluatedValueEscaped, ExpanderOptions.ExpandBuiltInMetadata, ElementLocation.EmptyLocation);
Instance\ProjectOnErrorInstance.cs (12)
35private ElementLocation _location; 40private ElementLocation _conditionLocation; 45private ElementLocation _executeTargetsLocation; 54ElementLocation location, 55ElementLocation executeTargetsLocation, 56ElementLocation conditionLocation) 94public override ElementLocation Location 102public override ElementLocation ConditionLocation 110public ElementLocation ExecuteTargetsLocation 125translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 126translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization); 127translator.Translate(ref _executeTargetsLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectPropertyGroupTaskInstance.cs (8)
36private ElementLocation _location; 41private ElementLocation _conditionLocation; 49ElementLocation location, 50ElementLocation conditionLocation, 105public override ElementLocation Location 113public override ElementLocation ConditionLocation 135translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 136translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectPropertyGroupTaskPropertyInstance.cs (8)
38private ElementLocation _location; 43private ElementLocation _conditionLocation; 48internal ProjectPropertyGroupTaskPropertyInstance(string name, string value, string condition, ElementLocation location, ElementLocation conditionLocation) 112public ElementLocation Location 120public ElementLocation ConditionLocation 138translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 139translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectPropertyInstance.cs (3)
236internal static ProjectPropertyInstance Create(string name, string escapedValue, ElementLocation location) 245internal static ProjectPropertyInstance Create(string name, string escapedValue, ElementLocation location, bool isImmutable) 322private static ProjectPropertyInstance Create(string name, string escapedValue, bool mayBeReserved, ElementLocation location, bool isImmutable, bool isEnvironmentProperty = false, LoggingContext loggingContext = null)
Instance\ProjectTargetInstance.cs (36)
89private ElementLocation _location; 94private ElementLocation _conditionLocation; 99private ElementLocation _inputsLocation; 104private ElementLocation _outputsLocation; 109private ElementLocation _returnsLocation; 114private ElementLocation _keepDuplicateOutputsLocation; 119private ElementLocation _dependsOnTargetsLocation; 124private ElementLocation _beforeTargetsLocation; 129private ElementLocation _afterTargetsLocation; 152ElementLocation location, 153ElementLocation conditionLocation, 154ElementLocation inputsLocation, 155ElementLocation outputsLocation, 156ElementLocation returnsLocation, 157ElementLocation keepDuplicateOutputsLocation, 158ElementLocation dependsOnTargetsLocation, 159ElementLocation beforeTargetsLocation, 160ElementLocation afterTargetsLocation, 352public ElementLocation Location 362public ElementLocation ConditionLocation 372public ElementLocation InputsLocation 382public ElementLocation OutputsLocation 392public ElementLocation ReturnsLocation 402public ElementLocation KeepDuplicateOutputsLocation 412public ElementLocation DependsOnTargetsLocation 422public ElementLocation BeforeTargetsLocation 432public ElementLocation AfterTargetsLocation 561translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 562translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization); 563translator.Translate(ref _inputsLocation, ElementLocation.FactoryForDeserialization); 564translator.Translate(ref _outputsLocation, ElementLocation.FactoryForDeserialization); 565translator.Translate(ref _returnsLocation, ElementLocation.FactoryForDeserialization); 566translator.Translate(ref _keepDuplicateOutputsLocation, ElementLocation.FactoryForDeserialization); 567translator.Translate(ref _dependsOnTargetsLocation, ElementLocation.FactoryForDeserialization); 568translator.Translate(ref _beforeTargetsLocation, ElementLocation.FactoryForDeserialization); 569translator.Translate(ref _afterTargetsLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectTargetInstanceChild.cs (2)
37public abstract ElementLocation Location { get; } 43public abstract ElementLocation ConditionLocation { get; }
Instance\ProjectTaskInstance.cs (49)
58private CopyOnWriteDictionary<(string, ElementLocation)> _parameters; 70private ElementLocation _location; 75private ElementLocation _conditionLocation; 80private ElementLocation _continueOnErrorLocation; 85private ElementLocation _msbuildRuntimeLocation; 90private ElementLocation _msbuildArchitectureLocation; 130ElementLocation location, 140new CopyOnWriteDictionary<(string, ElementLocation)>(StringComparer.OrdinalIgnoreCase), 143condition == string.Empty ? null : ElementLocation.EmptyLocation, 144continueOnError == string.Empty ? null : ElementLocation.EmptyLocation, 145msbuildRuntime == string.Empty ? null : ElementLocation.EmptyLocation, 146msbuildArchitecture == string.Empty ? null : ElementLocation.EmptyLocation) 156CopyOnWriteDictionary<(string, ElementLocation)> parameters, 158ElementLocation location, 159ElementLocation conditionLocation, 160ElementLocation continueOnErrorElementLocation, 161ElementLocation msbuildRuntimeLocation, 162ElementLocation msbuildArchitectureLocation) 239foreach (KeyValuePair<string, (string, ElementLocation)> parameter in _parameters) 248internal IDictionary<string, (string, ElementLocation)> TestGetParameters => _parameters; 262public ElementLocation ContinueOnErrorLocation 270public ElementLocation MSBuildRuntimeLocation 278public ElementLocation MSBuildArchitectureLocation 286public override ElementLocation Location 294public override ElementLocation ConditionLocation 302internal IDictionary<string, (string, ElementLocation)> ParametersForBuild 329_parameters[parameterName] = (unevaluatedValue, ElementLocation.EmptyLocation); 342_outputs.Add(new ProjectTaskOutputItemInstance(itemName, taskOutputParameterName, condition ?? String.Empty, ElementLocation.EmptyLocation, ElementLocation.EmptyLocation, ElementLocation.EmptyLocation, condition == null ? null : ElementLocation.EmptyLocation)); 355_outputs.Add(new ProjectTaskOutputPropertyInstance(propertyName, taskOutputParameterName, condition ?? String.Empty, ElementLocation.EmptyLocation, ElementLocation.EmptyLocation, ElementLocation.EmptyLocation, condition == null ? null : ElementLocation.EmptyLocation)); 372translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 373translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization); 374translator.Translate(ref _continueOnErrorLocation, ElementLocation.FactoryForDeserialization); 375translator.Translate(ref _msbuildRuntimeLocation, ElementLocation.FactoryForDeserialization); 376translator.Translate(ref _msbuildArchitectureLocation, ElementLocation.FactoryForDeserialization); 378IDictionary<string, (string, ElementLocation)> localParameters = _parameters; 383count => new CopyOnWriteDictionary<(string, ElementLocation)>()); 387_parameters = (CopyOnWriteDictionary<(string, ElementLocation)>)localParameters; 396private static void ParametersValueTranslator(ITranslator translator, ref (string, ElementLocation) value) 401var item2 = value.Item2; 404translator.Translate(ref item2, ElementLocation.FactoryForDeserialization); 409var item2 = default(ElementLocation); 412translator.Translate(ref item2, ElementLocation.FactoryForDeserialization);
Instance\ProjectTaskInstanceChild.cs (3)
29public abstract ElementLocation Location 37public abstract ElementLocation TaskParameterLocation 45public abstract ElementLocation ConditionLocation
Instance\ProjectTaskOutputItemInstance.cs (16)
38private ElementLocation _location; 43private ElementLocation _itemTypeLocation; 48private ElementLocation _taskParameterLocation; 53private ElementLocation _conditionLocation; 58internal ProjectTaskOutputItemInstance(string itemType, string taskParameter, string condition, ElementLocation location, ElementLocation itemTypeLocation, ElementLocation taskParameterLocation, ElementLocation conditionLocation) 107public override ElementLocation Location 115public override ElementLocation ConditionLocation 123public override ElementLocation TaskParameterLocation 131public ElementLocation ItemTypeLocation 147translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 148translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization); 149translator.Translate(ref _itemTypeLocation, ElementLocation.FactoryForDeserialization); 150translator.Translate(ref _taskParameterLocation, ElementLocation.FactoryForDeserialization);
Instance\ProjectTaskOutputPropertyInstance.cs (16)
38private ElementLocation _location; 43private ElementLocation _propertyNameLocation; 48private ElementLocation _taskParameterLocation; 53private ElementLocation _conditionLocation; 58internal ProjectTaskOutputPropertyInstance(string propertyName, string taskParameter, string condition, ElementLocation location, ElementLocation propertyNameLocation, ElementLocation taskParameterLocation, ElementLocation conditionLocation) 107public ElementLocation PropertyNameLocation 115public override ElementLocation Location 123public override ElementLocation ConditionLocation 131public override ElementLocation TaskParameterLocation 147translator.Translate(ref _location, ElementLocation.FactoryForDeserialization); 148translator.Translate(ref _conditionLocation, ElementLocation.FactoryForDeserialization); 149translator.Translate(ref _propertyNameLocation, ElementLocation.FactoryForDeserialization); 150translator.Translate(ref _taskParameterLocation, ElementLocation.FactoryForDeserialization);
Instance\TaskFactories\AssemblyTaskFactory.cs (4)
15using ElementLocation = Microsoft.Build.Construction.ElementLocation; 257ElementLocation elementLocation, 316internal ITask CreateTaskInstance(ElementLocation taskLocation, TaskLoggingContext taskLoggingContext, IBuildComponentHost buildComponentHost, IDictionary<string, string> taskIdentityParameters, 419internal bool TaskNameCreatableByFactory(string taskName, IDictionary<string, string> taskIdentityParameters, string taskProjectFile, TargetLoggingContext targetLoggingContext, ElementLocation elementLocation)
Instance\TaskFactoryLoggingHost.cs (3)
8using ElementLocation = Microsoft.Build.Construction.ElementLocation; 32private ElementLocation _elementLocation; 61public TaskFactoryLoggingHost(bool isRunningWithMultipleNodes, ElementLocation elementLocation, BuildLoggingContext loggingContext)
Instance\TaskRegistry.cs (6)
464ElementLocation elementLocation) 520ElementLocation elementLocation, 768ElementLocation elementLocation) 1265internal bool CanTaskBeCreatedByFactory(string taskName, string taskProjectFile, IDictionary<string, string> taskIdentityParameters, TargetLoggingContext targetLoggingContext, ElementLocation elementLocation) 1355internal TaskFactoryWrapper GetTaskFactoryFromRegistrationRecord(string taskName, string taskProjectFile, IDictionary<string, string> taskIdentityParameters, TargetLoggingContext targetLoggingContext, ElementLocation elementLocation) 1369private bool GetTaskFactory(TargetLoggingContext targetLoggingContext, ElementLocation elementLocation, string taskProjectFile)
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (3)
86public abstract ElementLocation Location { get; } 102public abstract ElementLocation GetAttributeLocation(string attributeName); 129public static ElementLocation GetAttributeLocation(ProjectElement xml, string attributeName) => xml.GetAttributeLocation(attributeName);
ObjectModelRemoting\ConstructionObjectLinks\ProjectRootElementLink.cs (1)
53public abstract ElementLocation ProjectFileLocation { get; }
ObjectModelRemoting\ConstructionObjectLinks\ProjectTaskElementLink.cs (1)
25public abstract IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations { get; }
Xml\ProjectXmlUtilities.cs (1)
79internal static void ThrowProjectInvalidChildElement(string name, string parentName, ElementLocation location)
Microsoft.Build.BuildCheck.UnitTests (7)
BuildCheckManagerProviderTests.cs (1)
124ElementLocation.EmptyLocation,
DoubleWritesAnalyzer_Tests.cs (1)
35Construction.ElementLocation.EmptyLocation,
TestAssets\CustomCheck\Check1.cs (1)
48ElementLocation.EmptyLocation,
TestAssets\CustomCheck\Check2.cs (1)
37ElementLocation.EmptyLocation,
TestAssets\CustomCheck2\Check3.cs (1)
37ElementLocation.EmptyLocation,
TestAssets\ErrorCustomCheck\ErrorOnInitializeCheck.cs (1)
39ElementLocation.EmptyLocation,
TestAssets\ErrorCustomCheck\ErrorWhenRegisteringActions.cs (1)
39ElementLocation.EmptyLocation,
Microsoft.Build.Engine.OM.UnitTests (74)
Construction\ElementLocationPublic_Tests.cs (6)
73ElementLocation e1 = target.Location; 74ElementLocation e2 = target.OutputsLocation; 131var values = new List<KeyValuePair<string, ElementLocation>>((ICollection<KeyValuePair<string, ElementLocation>>)property.GetValue(element, null)); 137var value = ((ElementLocation)property.GetValue(element, null));
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (6)
242public static void VerifySameLocationWithException(Func<ElementLocation> expectedGetter, Func<ElementLocation> actualGetter, ValidationContext context = null) 244Assert.Equal(GetWithExceptionCheck(expectedGetter, out var expected), GetWithExceptionCheck(actualGetter, out var actual)); 248public static void VerifySameLocation(ElementLocation expected, ElementLocation actual, ValidationContext context = null)
ObjectModelRemoting\Helpers\ViewValidation.cs (2)
102public Action<ElementLocation, ElementLocation> ValidateLocation { get; set; }
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (2)
192context.ValidateLocation = delegate (ElementLocation a, ElementLocation e) { return; };
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\InheritanceImplementationHelpers.cs (2)
92public static ElementLocation GetLocation(this IProjectElementLinkHelper xml) 117public static ElementLocation GetAttributeLocation(this IProjectElementLinkHelper xml, string attributeName)
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectChooseElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectElementContainerLink.cs (2)
76public override ElementLocation Location => EImpl.GetLocation(); 81public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectElementLink.cs (4)
37public ElementLocation Location => Source.Location; 55public ElementLocation GetAttributeLocation(string attributeName) 98public override ElementLocation Location => EImpl.GetLocation(); 103public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectExtensionsElementLink.cs (2)
62public override ElementLocation Location => EImpl.GetLocation(); 67public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectImportElementLink.cs (2)
59public override ElementLocation Location => EImpl.GetLocation(); 64public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectImportGroupElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectItemDefinitionElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectItemDefinitionGroupElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectItemElementLink.cs (2)
61public override ElementLocation Location => EImpl.GetLocation(); 66public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectItemGroupElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectMetadataElementLink.cs (2)
61public override ElementLocation Location => EImpl.GetLocation(); 66public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectOnErrorElementLink.cs (2)
49public override ElementLocation Location => EImpl.GetLocation(); 54public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectOtherwiseElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectOutputElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectPropertyElementLink.cs (2)
61public override ElementLocation Location => EImpl.GetLocation(); 66public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectPropertyGroupElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectRootElementLink.cs (4)
38public ElementLocation ProjectFileLocation => this.ProjectXml.ProjectFileLocation; 173public override ElementLocation Location => EImpl.GetLocation(); 178public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName); 202public override ElementLocation ProjectFileLocation => Proxy.ProjectFileLocation;
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectSdkElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectTargetElementLink.cs (2)
61public override ElementLocation Location => EImpl.GetLocation(); 66public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectTaskElementLink.cs (4)
35public IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations => this.TaskXml.ParameterLocations; 59public override IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations => this.Proxy.ParameterLocations; 77public override ElementLocation Location => EImpl.GetLocation(); 82public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectUsingTaskBodyElementLink.cs (2)
57public override ElementLocation Location => EImpl.GetLocation(); 62public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectUsingTaskElementLink.cs (2)
52public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectUsingTaskParameterElementLink.cs (2)
53public override ElementLocation Location => EImpl.GetLocation(); 58public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectWhenElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockUsingTaskParameterGroupElementLink.cs (2)
50public override ElementLocation Location => EImpl.GetLocation(); 55public override ElementLocation GetAttributeLocation(string attributeName) => EImpl.GetAttributeLocation(attributeName);
Microsoft.Build.Engine.UnitTests (123)
BackEnd\AssemblyTaskFactory_Tests.cs (25)
59taskFactory.InitializeFactory(null, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 71taskFactory.InitializeFactory(_loadInfo, null, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 83taskFactory.InitializeFactory(_loadInfo, String.Empty, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 95taskFactory.InitializeFactory(_loadInfo, "RandomTask", new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 134Assert.True(_taskFactory.TaskNameCreatableByFactory("TaskToTestFactories", null, String.Empty, null, ElementLocation.Create(".", 1, 1))); 143Assert.False(_taskFactory.TaskNameCreatableByFactory("NotInAssembly", null, String.Empty, null, ElementLocation.Create(".", 1, 1))); 154Assert.False(_taskFactory.TaskNameCreatableByFactory(String.Empty, null, String.Empty, null, ElementLocation.Create(".", 1, 1))); 165Assert.False(_taskFactory.TaskNameCreatableByFactory(null, null, String.Empty, null, ElementLocation.Create(".", 1, 1))); 185Assert.True(_taskFactory.TaskNameCreatableByFactory("TaskToTestFactories", taskIdentityParameters, String.Empty, null, ElementLocation.Create(".", 1, 1))); 205Assert.False(_taskFactory.TaskNameCreatableByFactory("TaskToTestFactories", taskIdentityParameters, String.Empty, null, ElementLocation.Create(".", 1, 1))); 248createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 279createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 310createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 343createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 376createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 411createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 444createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 475createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 510createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 539createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 572createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 605createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 639createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), null, 662createdTask = _taskFactory.CreateTaskInstance(ElementLocation.Create("MSBUILD"), null, new MockHost(), taskParameters, 691_loadedType = _taskFactory.InitializeFactory(_loadInfo, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, factoryParameters, explicitlyLaunchTaskHost, null, ElementLocation.Create("NONE"), String.Empty);
BackEnd\BuildRequestConfiguration_Tests.cs (1)
574referencePath = project.ExpandPropertyValueBestEffortLeaveEscaped(referencePath, ElementLocation.EmptyLocation);
BackEnd\MockSdkResolverService.cs (1)
27public Build.BackEnd.SdkResolution.SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\SdkResolverLoader_Tests.cs (7)
139sdkResolverLoader.LoadAllResolvers(ElementLocation.EmptyLocation); 171sdkResolverLoader.LoadAllResolvers(ElementLocation.EmptyLocation); 202sdkResolverLoader.LoadAllResolvers(ElementLocation.EmptyLocation); 457public Func<string, ElementLocation, IReadOnlyList<string>> FindPotentialSdkResolversFunc { get; set; } 461public Action<string, ElementLocation, List<SdkResolver>> LoadResolversAction { get; set; } 483internal override IReadOnlyList<string> FindPotentialSdkResolvers(string rootFolder, ElementLocation location) 493protected override void LoadResolvers(string resolverPath, ElementLocation location, List<SdkResolver> resolvers)
BackEnd\SdkResolverService_Tests.cs (3)
685internal override IReadOnlyList<SdkResolver> LoadAllResolvers(ElementLocation location) 692internal override IReadOnlyList<SdkResolverManifest> GetResolversManifests(ElementLocation location) 713protected internal override IReadOnlyList<SdkResolver> LoadResolversFromManifest(SdkResolverManifest manifest, ElementLocation location)
BackEnd\TargetEntry_Tests.cs (2)
21using ElementLocation = Microsoft.Build.Construction.ElementLocation; 928Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation)
BackEnd\TaskBuilder_Tests.cs (2)
23using ElementLocation = Microsoft.Build.Construction.ElementLocation; 887Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation)
BackEnd\TaskExecutionHost_Tests.cs (24)
143var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 144parameters["ExecuteReturnParam"] = ("true", ElementLocation.Create("foo.proj")); 159var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 169var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 170parameters["NonExistentParam"] = ("foo", ElementLocation.Create("foo.proj")); 608var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 609parameters["ExecuteReturnParam"] = ("true", ElementLocation.Create("foo.proj")); 624var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 625parameters["ExecuteReturnParam"] = ("false", ElementLocation.Create("foo.proj")); 642var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 643parameters["ExecuteReturnParam"] = ("false", ElementLocation.Create("foo.proj")); 943Assert.False(_host.GatherTaskOutputs("NonExistentOutput", ElementLocation.Create(".", 1, 1), true, "output")); 992ElementLocation.Create("none", 1, 1), 1020ElementLocation.Create("none", 1, 1), 1259ElementLocation.Create("none", 1, 1), 1299Assert.True(_host.GatherTaskOutputs(outputName, ElementLocation.Create(".", 1, 1), true, "output")); 1311Assert.True(_host.GatherTaskOutputs(outputName, ElementLocation.Create(".", 1, 1), true, "output")); 1323Assert.True(_host.GatherTaskOutputs(outputName, ElementLocation.Create(".", 1, 1), true, "output")); 1338Assert.True(_host.GatherTaskOutputs(outputName, ElementLocation.Create(".", 1, 1), true, "output")); 1353Assert.True(_host.GatherTaskOutputs(outputName, ElementLocation.Create(".", 1, 1), false, "output")); 1484parameters[parameterName] = (value, ElementLocation.Create("foo.proj")); 1492private Dictionary<string, (string, ElementLocation)> GetStandardParametersDictionary(bool returnParam) 1494var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 1495parameters["ExecuteReturnParam"] = (returnParam ? "true" : "false", ElementLocation.Create("foo.proj"));
BackEnd\TaskHost_Tests.cs (2)
47private ElementLocation _elementLocation; 73_elementLocation = ElementLocation.Create("MockFile", 5, 5);
BackEnd\TaskRegistry_Tests.cs (3)
77private readonly ElementLocation _elementLocation = ElementLocation.Create("c:\\project.proj", 0, 0); 1247InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => registry.GetRegisteredTask("Task1", "none", null, false, new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2)));
Construction\ElementLocation_Tests.cs (27)
41IElementLocation location = ElementLocation.Create("file", 65536, 0); 54IElementLocation location = ElementLocation.Create("file", 0, 65536); 67IElementLocation location = ElementLocation.Create("file", 65536, 65537); 80IElementLocation location1 = ElementLocation.Create("file", 65536, 65537); 81IElementLocation location2 = ElementLocation.Create("file", 0, 1); 82IElementLocation location3 = ElementLocation.Create("file", 0, 65537); 83IElementLocation location4 = ElementLocation.Create("file", 65536, 1); 84IElementLocation location5 = ElementLocation.Create("file", 0, 1); 85IElementLocation location6 = ElementLocation.Create("file", 65536, 65537); 163IElementLocation location = ElementLocation.Create("file", 65536, 65537); 165TranslationHelpers.GetWriteTranslator().Translate(ref location, ElementLocation.FactoryForDeserialization); 167TranslationHelpers.GetReadTranslator().Translate(ref deserializedLocation, ElementLocation.FactoryForDeserialization); 181IElementLocation location = ElementLocation.EmptyLocation; 183TranslationHelpers.GetWriteTranslator().Translate(ref location, ElementLocation.FactoryForDeserialization); 185TranslationHelpers.GetReadTranslator().Translate(ref deserializedLocation, ElementLocation.FactoryForDeserialization); 199IElementLocation location = ElementLocation.Create("file", 65535, 65534); 214ElementLocation.Create("file", -1, 2); 225ElementLocation.Create("file", 1, -2); 234IElementLocation location = ElementLocation.Create(null); 244IElementLocation location = ElementLocation.Create("file", 65535, 0); 257IElementLocation location = ElementLocation.Create("file", 0, 65535); 270IElementLocation location = ElementLocation.Create("file", 65535, 65534); 283IElementLocation location = ElementLocation.Create("file", 65535, 2); 285TranslationHelpers.GetWriteTranslator().Translate(ref location, ElementLocation.FactoryForDeserialization); 287TranslationHelpers.GetReadTranslator().Translate(ref deserializedLocation, ElementLocation.FactoryForDeserialization); 436var value = ((ElementLocation)property.GetValue(node, null));
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
533importingElement.SdkLocation.ShouldBe(ElementLocation.EmptyLocation);
ExpressionTree_Tests.cs (5)
109tree = p.Parse(command, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 118ElementLocation.EmptyLocation, 341ElementLocation.EmptyLocation, 450ElementLocation.EmptyLocation, 486ElementLocation.EmptyLocation,
ExpressionTreeExpression_Tests.cs (6)
436GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 444ElementLocation.EmptyLocation, 460GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 468ElementLocation.EmptyLocation, 491var tree = p.Parse(expression, ParserOptions.AllowAll, ElementLocation.EmptyLocation); 500ElementLocation.EmptyLocation,
Instance\ProjectInstance_Internal_Tests.cs (8)
801targetInstance.ConditionLocation.ShouldBe(ElementLocation.EmptyLocation); 802targetInstance.InputsLocation.ShouldBe(ElementLocation.EmptyLocation); 803targetInstance.OutputsLocation.ShouldBe(ElementLocation.EmptyLocation); 804targetInstance.ReturnsLocation.ShouldBe(ElementLocation.EmptyLocation); 805targetInstance.KeepDuplicateOutputsLocation.ShouldBe(ElementLocation.EmptyLocation); 806targetInstance.DependsOnTargetsLocation.ShouldBe(ElementLocation.EmptyLocation); 807targetInstance.BeforeTargetsLocation.ShouldBe(ElementLocation.EmptyLocation); 808targetInstance.AfterTargetsLocation.ShouldBe(ElementLocation.EmptyLocation);
Instance\ProjectTaskInstance_Internal_Tests.cs (1)
72var parametersCopy = new Dictionary<string, (string, ElementLocation)>(parameters.Count);
TestComparers\ProjectInstanceModelTestComparers.cs (2)
341private void AssertParametersEqual(IDictionary<string, (string, ElementLocation)> x, IDictionary<string, (string, ElementLocation)> y)
TestData\ProjectInstanceTestObjects.cs (3)
109IDictionary<string, (string, ElementLocation)> parameters = null, 115? new CopyOnWriteDictionary<(string, ElementLocation)>(parameters) 116: new CopyOnWriteDictionary<(string, ElementLocation)>();
Microsoft.Build.UnitTests.Shared (4)
ObjectModelHelpers.cs (4)
2031public sealed class ElementLocationComparerIgnoringType : IEqualityComparer<ElementLocation> 2033public bool Equals(ElementLocation x, ElementLocation y) 2053public int GetHashCode(ElementLocation obj)