54 references to Xml
dotnet-openapi (1)
ProjectExtensions.cs (1)
17item.Xml.AddMetadata(kvp.Key, kvp.Value, expressAsAttribute: true);
Microsoft.Build (16)
Definition\Project.cs (10)
1683if (item.Xml == itemElement) 2755.SkipWhile(i => i != item.Xml) 2766return [item.Xml, .. relevantElementsAfterInclude]; 3404if (item.Xml == itemElement) 3638if (item.Project == null || item.Xml.Parent == null) 3647VerifyThrowInvalidOperationNotImported(item.Xml.ContainingProject); 3649SplitItemElementIfNecessary(item.Xml); 3651ProjectElementContainer parent = item.Xml.Parent; 3653item.Xml.Parent.RemoveChild(item.Xml);
Definition\ProjectItem.cs (1)
862value = BuiltInMetadata.GetMetadataValueEscaped(_project.DirectoryPath, _evaluatedIncludeBeforeWildcardExpansionEscaped, _evaluatedIncludeEscaped, this.Xml.ContainingProject.FullPath, name, ref _fullPath);
Instance\ProjectInstance.cs (4)
408this.EvaluatedItemElements.Add(item.Xml); 484EvaluatedItemElements.Add(item.Xml); 3360item.Xml.ContainingProject.EscapedFullPath, 3419item.Xml.ContainingProject.EscapedFullPath,
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemLink.cs (1)
24/// Access to remote <see cref="ProjectItem.Xml"/>.
Microsoft.Build.Engine.OM.UnitTests (35)
Construction\ConstructionEditing_Tests.cs (1)
2327item.Xml.Condition = "false";
Construction\ProjectItemElement_Tests.cs (3)
961item.Xml.Condition = "false"; 977item.Xml.Include = "i2"; 993item.Xml.Exclude = "i1";
Definition\DefinitionEditing_Tests.cs (17)
474ProjectItemElement item2 = project.AddItem("i", "i1.xxx")[0].Xml; 5310].Xml; 561ProjectItemElement item2 = project.AddItem("i", @"c:\subdir1\a\b\c\i1.xyx")[0].Xml; 899Assert.True(object.ReferenceEquals(item.Xml, newItemElement)); 927Assert.True(object.ReferenceEquals(item.Xml, newItemElement)); 953Assert.True(object.ReferenceEquals(item.Xml, newItemElement)); 1190Assert.True(object.ReferenceEquals(itemGroupElement, item.Xml.Parent)); 1211item0.Xml.Exclude = "e"; 1284Assert.True(object.ReferenceEquals(itemGroupElement, item.Xml.Parent)); 1285Assert.True(object.ReferenceEquals(itemGroupElement, Helpers.GetFirst(project.GetItems("i")).Xml.Parent)); 1638item.Xml.Parent.RemoveAllChildren(); 1653item.Xml.Parent.RemoveAllChildren(); 1955Assert.True(object.ReferenceEquals(items[0].Xml, items[1].Xml)); 2395ProjectItemElement item2 = project.AddItemFast("i", "i1.xxx")[0].Xml; 2448NativeMethodsShared.IsWindows ? @"c:\subdir1\a\b\subdir2\c\i1.xyx" : "/subdir1/a/b/subdir2/c/i1.xyx")[0].Xml; 2478ProjectItemElement item2 = project.AddItemFast("i", @"c:\subdir1\a\b\c\i1.xyx")[0].Xml;
Definition\Project_Tests.cs (1)
1770project.Xml.RawXml.ShouldNotContain(itemToRemove.Xml.Include);
Definition\ProjectItem_Tests.cs (8)
101Assert.NotNull(item.Xml); 1881Assert.Equal(0, Helpers.Count(item.Xml.Metadata)); 1903Assert.Equal(0, item.Xml.Count); 1972Assert.Equal("i2", item.Xml.Include); 2191Assert.Single(item.Xml.Metadata); 2193ProjectMetadataElement metadataElement = item.Xml.Metadata.FirstOrDefault(); 2245var metadataElements = items.First().Xml.Metadata; 2301var metadataElements = items.First().Xml.Metadata;
Definition\ProtectImports_Tests.cs (2)
529Assert.Equal(_importFilename, item.Xml.ContainingProject.FullPath); // "Item was not found in the imported project." 636Assert.Null(item.Xml.ContainingProject.FullPath); // "Item was not found in the project." // null because XML is in-memory
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (2)
216Verify(view.Xml, real.Xml);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemLink.cs (1)
23public MockProjectItemElementLinkRemoter Xml => (MockProjectItemElementLinkRemoter)this.OwningCollection.ExportElement(this.Source.Xml);
Microsoft.Build.Engine.UnitTests (2)
Definition\ProjectItem_Tests.cs (1)
30ProjectItemFactory factory = new ProjectItemFactory(item1.Project, item1.Xml);
Evaluation\Evaluator_Tests.cs (1)
1479ProjectRootElement importXml = ProjectRootElement.Open(project.Items.ElementAt(0).Xml.ContainingProject.FullPath);