235 references to Name
BuildBoss (3)
ProjectCheckerUtil.cs (1)
83if (element.Name.LocalName == propertyName)
ProjectUtil.cs (2)
40Namespace = document.Root.Name.Namespace; 164internal XElement FindSingleProperty(string localName) => GetAllPropertyGroupElements().SingleOrDefault(x => x.Name.LocalName == localName);
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (3)
541if (element.Name == "para" || element.Name == "p") 547if (element.Name == "br")
dotnet-svcutil-lib (3)
Shared\MSBuildProj.cs (3)
174if (projDefinition.Root != null && projDefinition.Root.Name != null) 176msbuildNS = projDefinition.Root.Name.Namespace; 476itemNameElement = reference.Elements().FirstOrDefault(item => item.Name == itemName);
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
50&& el.Name == "PropertyGroup"
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
50&& el.Name == "PropertyGroup"
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
241element.Name == "add" &&
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
241element.Name == "add" &&
Microsoft.AspNetCore.DataProtection (6)
KeyManagement\XmlKeyManager.cs (5)
193if (element.Name == KeyElementName) 208else if (element.Name == RevocationElementName) 234_logger.UnknownElementWithNameFoundInKeyringSkipping(element.Name); 290Debug.Assert(keyElement.Name == KeyElementName); 346Debug.Assert(revocationElement.Name == RevocationElementName);
XmlExtensions.cs (1)
21var newElement = new XElement(element.Name);
Microsoft.AspNetCore.DataProtection.Tests (26)
KeyManagement\KeyEscrowServiceProviderExtensionsTests.cs (3)
39output.Add(string.Format(CultureInfo.InvariantCulture, "{0:D}: {1}", keyId, element.Name.LocalName)); 64output.Add(string.Format(CultureInfo.InvariantCulture, "[sink1] {0:D}: {1}", keyId, element.Name.LocalName)); 71output.Add(string.Format(CultureInfo.InvariantCulture, "[sink2] {0:D}: {1}", keyId, element.Name.LocalName));
Repositories\EphemeralXmlRepositoryTests.cs (5)
62switch (element.Element.Name.LocalName) 71Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName); 78var elementSet = new HashSet<string>(repository.GetAllElements().Select(e => e.Name.LocalName)); 82Assert.Equal(!delete1, elementSet.Contains(element1.Name.LocalName)); 83Assert.Equal(!delete2, elementSet.Contains(element2.Name.LocalName));
Repositories\FileSystemXmlRepositoryTests.cs (6)
136var orderedNames = allElements.Select(el => el.Name.LocalName).OrderBy(name => name); 167switch (element.Element.Name.LocalName) 176Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName); 183var elementSet = new HashSet<string>(repository.GetAllElements().Select(e => e.Name.LocalName)); 187Assert.Equal(!delete1, elementSet.Contains(element1.Name.LocalName)); 188Assert.Equal(!delete2, elementSet.Contains(element2.Name.LocalName));
Repositories\RegistryXmlRepositoryTests.cs (6)
123var orderedNames = allElements.Select(el => el.Name.LocalName).OrderBy(name => name); 155switch (element.Element.Name.LocalName) 164Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName); 171var elementSet = new HashSet<string>(repository.GetAllElements().Select(e => e.Name.LocalName)); 175Assert.Equal(!delete1, elementSet.Contains(element1.Name.LocalName)); 176Assert.Equal(!delete2, elementSet.Contains(element2.Name.LocalName));
XmlAssert.cs (2)
50return expected.Name == actual.Name
XmlEncryption\CertificateXmlEncryptionTests.cs (1)
50Assert.Equal(XName.Get("EncryptedData", "http://www.w3.org/2001/04/xmlenc#"), encryptedXmlInfo.EncryptedElement.Name);
XmlEncryption\EncryptedXmlDecryptorTests.cs (1)
84Assert.Equal("SampleData", decrypted.Name);
XmlEncryption\XmlEncryptionExtensionsTests.cs (2)
179.Returns<XElement>(el => new XElement(el.Name.LocalName + "_decrypted", new XElement(XmlConstants.EncryptedSecretElementName, "nested"))); 265.Returns<XElement>(element => new EncryptedXmlInfo(new XElement(element.Name.LocalName + "_encrypted"), typeof(MyXmlDecryptor)));
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
XmlAssert.cs (1)
71element.Name,
Microsoft.AspNetCore.Mvc.FunctionalTests (20)
AsyncEnumerableTestBase.cs (1)
88var @namespace = xml.Root.Name.NamespaceName;
src\Mvc\Mvc.Formatters.Xml\test\XmlAssert.cs (1)
71element.Name,
XmlDataContractSerializerFormattersWrappingTest.cs (9)
238Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 239Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 240Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 242Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value); 281Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 282Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 283var mvcErrors = root.Element(root.Name.Namespace.GetName("MVC-Errors")); 285Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value); 287Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value);
XmlSerializerFormattersWrappingTest.cs (9)
221Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 222Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 223Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 225Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value); 263Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 264Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 265var mvcErrors = root.Element(root.Name.Namespace.GetName("MVC-Errors")); 267Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value); 269Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value);
Microsoft.Build.BuildCheck.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.CommandLine.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.Engine.OM.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.Engine.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\GenerateBindingRedirects.cs (6)
76.FirstOrDefault(e => e.Name.LocalName == "runtime"); 199.Where(e => e.Name.LocalName == "assemblyBinding"); 206.Where(e => e.Name.LocalName == "dependentAssembly"); 213.FirstOrDefault(e => e.Name.LocalName == "assemblyIdentity"); 226.FirstOrDefault(e => e.Name.LocalName == "bindingRedirect"); 345if (document.Root == null || document.Root.Name != "configuration")
ResourceHandling\MSBuildResXReader.cs (1)
34switch (elem.Name.LocalName)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (6)
335if (child.Name.LocalName.Equals("Code")) 346else if (child.Name.LocalName.Equals("Reference")) 360else if (child.Name.LocalName.Equals("Using")) 377child.Name.LocalName, 378document.Root.Name.LocalName); 387document.Root.Name.LocalName);
Microsoft.Build.Tasks.UnitTests (2)
GenerateBindingRedirects_Tests.cs (1)
144.Count(e => e.Name.LocalName.Equals("assemblyBinding", StringComparison.OrdinalIgnoreCase))
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.Build.Utilities.UnitTests (1)
TestAssemblyInfo.cs (1)
120var ns = doc.Root.Name.Namespace;
Microsoft.CodeAnalysis (6)
RuleSet\RuleSetProcessor.cs (6)
83Debug.Assert(nodeList[0].Name == RuleSetNodeName); 108if (childNode.Name == RulesNodeName) 130else if (childNode.Name == IncludeNodeName) 134else if (childNode.Name == IncludeAllNodeName) 159if (ruleNode.Name == RuleNodeName) 258throw new InvalidRuleSetException(string.Format(CodeAnalysisResources.RuleSetMissingAttribute, node.Name, attributeName));
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
403.Where(e => e.Name.LocalName == "SymbolKind" && e.Value == "Method").ToList();
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
254return string.IsNullOrEmpty(element.Name.NamespaceName) && DocumentationCommentXmlNames.ElementEquals(element.Name.LocalName, name); 526XmlNameAttributeSyntax attrSyntax = ParseNameAttribute(attribute.ToString(), attribute.Parent.Name.LocalName);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (2)
364if (element.Name == "Sequence") 366return new XElement(element.Name, children);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MockSymbolTests.cs (1)
110switch (xel.Name.LocalName)
Microsoft.CodeAnalysis.Features (1)
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
325var name = element.Name.LocalName;
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Options\NamingStyleTestUtilities.cs (1)
37if (excludeNodes != null && excludeNodes.Contains(element.Name.LocalName))
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (5)
79if (codeSnippetsElement.Name.LocalName.Equals("CodeSnippets", StringComparison.OrdinalIgnoreCase)) 81return codeSnippetsElement.Elements().Where(e => e.Name.LocalName.Equals("CodeSnippet", StringComparison.OrdinalIgnoreCase)).ToImmutableArray(); 83else if (codeSnippetsElement.Name.LocalName.Equals("CodeSnippet", StringComparison.OrdinalIgnoreCase)) 93return element.Elements().Where(e => e.Name.LocalName.Equals(localName, StringComparison.OrdinalIgnoreCase)); 98return element?.Elements().FirstOrDefault(e => e.Name.LocalName.Equals(localName, StringComparison.OrdinalIgnoreCase));
Microsoft.CodeAnalysis.Test.Utilities (19)
Assert\AssertXml.cs (5)
223return element1.Name == "customDebugInfo" 230return element.Name.GetHashCode(); 248if (element1.Name != element2.Name) 261return element.Name.GetHashCode();
Metadata\ILValidation.cs (14)
332where e.Name == "method" 341.Descendants().Where(e => e.Name == "files").Single() 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.VisualBasic (3)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (3)
305Dim elementName As XName = element.Name 432Return String.IsNullOrEmpty(element.Name.NamespaceName) AndAlso 433DocumentationCommentXmlNames.ElementEquals(element.Name.LocalName, name, True)
Microsoft.CodeAnalysis.Workspaces (4)
Shared\Extensions\ISymbolExtensions.cs (3)
549var currentName = current.Name.ToString(); 635=> string.IsNullOrEmpty(element.Name.NamespaceName) && DocumentationCommentXmlNames.ElementEquals(element.Name.LocalName, name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
403.Where(e => e.Name.LocalName == "SymbolKind" && e.Value == "Method").ToList();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace`1.cs (1)
633if (workspaceElement.Name != WorkspaceElementName)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\XmlDocumentationProviderTests.cs (1)
44Assert.Equal("member", xmlDocument.Root!.Name.LocalName);
Microsoft.DotNet.Arcade.Sdk (4)
src\SourceBuild\AddSourceMappingToNugetConfig.cs (4)
28XElement pkgSrcMappingElement = document.Root.Descendants().FirstOrDefault(e => e.Name == "packageSourceMapping"); 49.Where(e => e.Name == "packageSource") 50.SelectMany(e => e.Descendants().Where(e => e.Name == "package")) 55XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "clear");
Microsoft.DotNet.Arcade.Sdk.Tests (1)
SourceMappingToNugetConfigTest.cs (1)
82Assert.Equal("clear", firstElement?.Name);
Microsoft.DotNet.Build.Tasks.Workloads (2)
Msi\WorkloadPackGroupMsi.wix.cs (2)
93var ns = productDoc.Root.Name.Namespace; 101ns = registryDoc.Root.Name.Namespace;
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
253x.Name.LocalName,
Microsoft.DotNet.VersionTools (1)
Automation\NupkgInfoFactory.cs (1)
65return el.Descendants().First(c => c.Name.LocalName.ToString() == name);
Microsoft.DotNet.XliffTasks (19)
Model\VsctDocument.cs (4)
20foreach (XElement strings in Document.Descendants(Document.Root.Name.Namespace + "Strings")) 33XName name = child.Name; 64foreach (XElement strings in Document.Descendants(Document.Root.Name.Namespace + "Strings")) 79foreach (XElement imageTag in Document.Descendants(Document.Root.Name.Namespace + "Bitmap"))
Model\XamlRuleDocument.cs (11)
30var descendentDisplayName = element.Elements(XName.Get($"{element.Name.LocalName}.DisplayName", element.Name.NamespaceName)).FirstOrDefault(); 31var descendentDescription = element.Elements(XName.Get($"{element.Name.LocalName}.Description", element.Name.NamespaceName)).FirstOrDefault(); 60if (element.Elements(XName.Get($"{element.Name.LocalName}.{localizableProperty}", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue) 82else if (AttributedName(element) == "SearchTerms" && (XmlName(attribute) == "Value" || element.Elements(XName.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { })) 93else if (element.Elements(XName.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue) 213var localName = element.Name.LocalName;
Model\XlfDocument.cs (2)
224XNamespace ns = _document.Root.Name.Namespace; 277XNamespace ns = _document.Root.Name.Namespace;
Tasks\TransformTemplates.cs (2)
77foreach (XElement projectNode in templateXml.Descendants().Where(d => d.Name.LocalName == "Project")) 84foreach (XElement templateItem in templateXml.Descendants().Where(d => d.Name.LocalName == "ProjectItem"))
Microsoft.Extensions.FileProviders.Embedded (5)
Manifest\ManifestParser.cs (5)
89if (string.Equals(element.Name.LocalName, "File", StringComparison.Ordinal)) 97if (string.Equals(element.Name.LocalName, "Directory", StringComparison.Ordinal)) 112$"Got '{element.Name.LocalName}' instead."); 131throw new InvalidOperationException($"Invalid manifest format. '{element.Name}' must contain a 'Name' attribute."); 148$"Invalid manifest format. '{element.Name.LocalName}' must contain " +
Microsoft.VisualStudio.LanguageServices (4)
Snippets\SnippetExpansionClient.cs (4)
309var ns = snippetNode.Name.NamespaceName; 1080var referencesNode = snippetNode.Element(XName.Get("References", snippetNode.Name.NamespaceName)); 1090var assemblyXmlName = XName.Get("Assembly", snippetNode.Name.NamespaceName); 1093foreach (var reference in referencesNode.Elements(XName.Get("Reference", snippetNode.Name.NamespaceName)))
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (1)
1406docElement.Name.ToString().ToLower() != "doc")
Snippets\CSharpSnippetExpansionLanguageHelper.cs (3)
78var importsNode = snippetNode.Element(XName.Get("Imports", snippetNode.Name.NamespaceName)); 111var namespaceXmlName = XName.Get("Namespace", snippetNode.Name.NamespaceName); 115foreach (var import in importsNode.Elements(XName.Get("Import", snippetNode.Name.NamespaceName)))
PresentationFramework-SystemXmlLinq (1)
SystemXmlLinqExtension.cs (1)
39XName name = ((XElement)item).Name;
Roslyn.Test.PdbUtilities (26)
Reader\PdbValidation.cs (26)
365if (e.Name == "constant") 372else if (e.Name == "bucket" && e.Parent.Name == "dynamicLocals") 379else if (e.Name == "defunct") 443where e.Name == "customDebugInfo" && !e.HasElements 450where e.Name == "scope" && !e.HasElements 458where e.Name == "sequencePoints" && !e.HasElements 465where e.Name == "method" && !e.HasElements 473where e.Name == "forwardIterator" || 474e.Name == "forwardToModule" || 475e.Name == "forward" || 476e.Name == "tupleElementNames" || 477e.Name == "dynamicLocals" || 478e.Name == "using" || 479e.Name == "currentnamespace" || 480(e.Name == "defaultnamespace" && e.Parent?.Name == "scope") || 481e.Name == "importsforward" || 482e.Name == "xmlnamespace" || 483e.Name == "alias" || 484e.Name == "namespace" || 485e.Name == "type" || 486e.Name == "extern" || 487e.Name == "externinfo" || 488e.Name == "defunct" || 489e.Name == "local" && e.Attributes().Any(a => a.Name.LocalName == "name" && a.Value.StartsWith("$VB$ResumableLocal_"))
System.ComponentModel.TypeConverter (10)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (10)
219if (e != null && (_value.name == e.Name || _value.name == null)) 226if (e != null && _value.element != e && _value.name != null && (_value.name == e.Name || _value.name == _changeState)) 243_changeState = e?.Name; 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)) 346if (e != null && _value.element == (_changeState as XContainer) && (_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))) 375_changeState = e?.Name;
System.Private.Xml.Linq (22)
System\Xml\Linq\XLinq.cs (4)
373XNamespace ns = e.Name.Namespace; 374_writer.WriteStartElement(GetPrefixOfNamespace(ns, true), e.Name.LocalName, ns.NamespaceName); 392XNamespace ns = e.Name.Namespace; 393await _writer.WriteStartElementAsync(GetPrefixOfNamespace(ns, true), e.Name.LocalName, ns.NamespaceName).ConfigureAwait(false);
System\Xml\Linq\XNodeReader.cs (9)
207return e.Name.LocalName; 254return e.Name.NamespaceName; 322string? prefix = e.GetPrefixOfNamespace(e.Name.Namespace); 892if (e.Name.LocalName == localName && 893e.Name.NamespaceName == namespaceName) 912if (e.Name.LocalName == localName && e.Name.NamespaceName == namespaceName) 935if (e.Name.LocalName == localName && 936e.Name.NamespaceName == namespaceName)
System\Xml\Schema\XNodeValidator.cs (2)
304validator!.ValidateElement(e.Name.LocalName, e.Name.NamespaceName, si, xsiType, xsiNil, null, null);
System\Xml\XPath\XNodeNavigator.cs (7)
137return e.Name.LocalName; 179return e.Name.NamespaceName; 235string? prefix = e.GetPrefixOfNamespace(e.Name.Namespace); 349if (element.Name.LocalName == localName && 350element.Name.NamespaceName == namespaceName) 525if (element.Name.LocalName == localName && 526element.Name.NamespaceName == namespaceName)