50 references to Parent
dotnet-svcutil-lib (3)
Shared\MSBuildProj.cs (3)
89_projectReferenceGroup = refItems.FirstOrDefault().Parent; 112_referenceGroup = refItems.FirstOrDefault().Parent; 136_packageReferenceGroup = refItems.FirstOrDefault().Parent;
Microsoft.AspNetCore.OpenApi.SourceGenerators (3)
XmlComments\XmlComment.InheritDoc.cs (3)
201xpathValue = BuildXPathForElement(element.Parent!); 354for (var current = element; current != null; current = current.Parent) 392AnalyzerDebug.Assert(copy.Parent == null); // Otherwise, when we give it one, it will be copied.
Microsoft.CodeAnalysis (1)
InternalUtilities\XmlUtilities.cs (1)
35Debug.Assert(copy.Parent == null); // Otherwise, when we give it one, it will be copied.
Microsoft.CodeAnalysis.CSharp (1)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
526XmlNameAttributeSyntax attrSyntax = ParseNameAttribute(attribute.ToString(), attribute.Parent.Name.LocalName);
Microsoft.CodeAnalysis.Test.Utilities (6)
Metadata\ILValidation.cs (6)
353if (e.Name == "entry" && e.Parent.Name == "sequencePoints") 361if (e.Name == "await" && e.Parent.Name == "asyncInfo") 366else if (e.Name == "catchHandler" && e.Parent.Name == "asyncInfo") 384if (e.Name == "await" && e.Parent.Name == "asyncInfo") 389else if (e.Name == "catchHandler" && e.Parent.Name == "asyncInfo") 397if (e.Name == "entry" && e.Parent.Name == "sequencePoints")
Microsoft.CodeAnalysis.Workspaces (3)
Shared\Extensions\ISymbolExtensions.cs (3)
396xpathValue = BuildXPathForElement(element.Parent!); 547for (var current = element; current != null; current = current.Parent) 582Debug.Assert(copy.Parent == null); // Otherwise, when we give it one, it will be copied.
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (1)
35Debug.Assert(copy.Parent == null); // Otherwise, when we give it one, it will be copied.
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
325throw new Exception($"LanguageVersion attribute on {languageVersionAttribute.Parent} was not recognized.");
Microsoft.DotNet.XliffTasks (14)
Model\VsctDocument.cs (3)
22string id = strings.Parent.Attribute("id").Value; 27string guid = strings.Parent.Attribute("guid").Value; 66string id = strings.Parent.Attribute("id").Value;
Model\XamlRuleDocument.cs (11)
125var parent = xObject.Parent; 133var grandparent = parent.Parent; 147var ancestorWithNameAttributeCandidate = element.Parent?.Parent; // start at grandparent 153if (element.Parent is not null) 155idBuilder.Append(element.Parent.Attribute("Name") is null ? XmlName(element.Parent) : $"{XmlName(element.Parent)}|{AttributedName(element.Parent)}"); 174while (ancestorWithNameAttributeCandidate?.Attribute("Name") is null && ancestorWithNameAttributeCandidate?.Parent is not null) { 177ancestorWithNameAttributeCandidate = ancestorWithNameAttributeCandidate.Parent;
Roslyn.Test.PdbUtilities (2)
Reader\PdbValidation.cs (2)
372else if (e.Name == "bucket" && e.Parent.Name == "dynamicLocals") 480(e.Name == "defaultnamespace" && e.Parent?.Name == "scope") ||
System.ComponentModel.TypeConverter (8)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (8)
166if (a != null && _value.element == a.Parent && _value.name == a.Name) 190_changeState = a != null && _value.element == a.Parent && _value.name == a.Name ? a : null; 271if (e != null && _value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e) 288if (_value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e) 311_changeState = e != null && _value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e ? e : null; 339if (e != null && _value.element == e.Parent && (_value.name == e.Name || _value.name == null)) 354if (e != null && _value.element == e.Parent && _value.name != null && (_value.name == e.Name || _value.name == (_changeState as XName))) 371_changeState = e?.Parent;
System.Private.Xml.Linq (7)
System\Xml\Schema\XNodeValidator.cs (2)
57if (source.Parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 63PushAncestorsAndSelf(source.Parent);
System\Xml\XPath\XNodeNavigator.cs (4)
782ce = ce.Parent; 811e = e.Parent; 821XElement? e = a.Parent; 858ce = ce.Parent;
System\Xml\XPath\XObjectExtensions.cs (1)
12XContainer? ret = (XContainer?)obj.Parent ?? obj.Document;