715 references to Attribute
aspire (48)
Packaging\NuGetConfigMerger.cs (39)
138var key = (string?)addElement.Attribute("key");
139var value = (string?)addElement.Attribute("value");
151.Select(e => (string?)e.Attribute("value") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
153.Select(e => (string?)e.Attribute("key") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
200var sourceKey = (string?)packageSourceElement.Attribute("key");
211var pattern = (string?)packageElement.Attribute("pattern");
285.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), keyToUse, StringComparison.OrdinalIgnoreCase));
300.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), pattern, StringComparison.OrdinalIgnoreCase));
326var pattern = (string?)packageElement.Attribute("pattern");
348.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), keyToUse, StringComparison.OrdinalIgnoreCase));
363.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), mapping.PackageFilter, StringComparison.OrdinalIgnoreCase));
386var key = (string?)ps.Attribute("key");
394var urlKey = (string?)elementToFix.Attribute("key");
399.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), properKey, StringComparison.OrdinalIgnoreCase));
408var pattern = (string?)packageToMove.Attribute("pattern");
410.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), pattern, StringComparison.OrdinalIgnoreCase));
446.Select(add => (string?)add.Attribute("key"))
454.Select(ps => (string?)ps.Attribute("key"))
471var originalSourceKey = (string?)ps.Attribute("key");
495.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
496var sourceValue = (string?)sourceElement?.Attribute("value");
524.Where(ps => ps.Elements("package").Any() && !ps.Elements("package").Any(p => (string?)p.Attribute("pattern") == "*"))
525.Select(ps => (string?)ps.Attribute("key"))
534.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
535var sourceValue = (string?)sourceElement?.Attribute("value");
543.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
642var sourceKey = (string?)emptyElement.Attribute("key");
658.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase) ||
659string.Equals((string?)add.Attribute("value"), sourceKey, StringComparison.OrdinalIgnoreCase));
703.Select(add => (string?)add.Attribute("key"))
710.Select(ps => (string?)ps.Attribute("key"))
723.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
724var sourceValue = (string?)sourceElement?.Attribute("value");
790.Select(e => (string?)e.Attribute("value") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
792.Select(e => (string?)e.Attribute("key") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
798var key = (string?)addElement.Attribute("key");
799var value = (string?)addElement.Attribute("value");
827var sourceKey = (string?)packageSourceElement.Attribute("key");
836var pattern = (string?)packageElement.Attribute("pattern");
Aspire.Cli.Tests (42)
Packaging\NuGetConfigMergerTests.cs (42)
93Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed1.example");
94Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
134Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
138Assert.NotNull(psm.Elements("packageSource").First().Elements("package").FirstOrDefault(p => (string?)p.Attribute("pattern") == "Aspire.*"));
174Assert.DoesNotContain(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://old.example");
176Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://new.example");
180Assert.Equal("https://new.example", (string?)psm.Element("packageSource")!.Attribute("key"));
181Assert.Equal("Lib.*", (string?)psm.Element("packageSource")!.Element("package")!.Attribute("pattern"));
325Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget" && (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
326Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "dotnet9" && (string?)e.Attribute("value") == "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json");
329Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-feed");
333var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget");
335Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
338var urlMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://api.nuget.org/v3/index.json");
375Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
376Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "custom");
379Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
391var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
393Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
396var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
398Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
400var customMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "custom");
402Assert.Contains(customMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
444Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
447Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
457var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
459Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
462var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
464Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
465Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
511e => (string?)e.Attribute("value") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
515e => (string?)e.Attribute("value") == "https://valid.example");
519e => (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
525ps => (string?)ps.Attribute("key") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
529.FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://valid.example");
531Assert.Contains(validExampleMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
535.FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://api.nuget.org/v3/index.json");
537Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
538Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
539Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
Aspire.Dashboard (1)
BuildBoss (8)
dotnet-svcutil-lib (2)
GenerateDocumentationAndConfigFiles (19)
IIS.FunctionalTests (6)
IIS.LongTests (3)
IIS.NewHandler.FunctionalTests (3)
IIS.NewShim.FunctionalTests (3)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (7)
Metrics (19)
Metrics.Legacy (19)
Microsoft.AspNetCore.App.UnitTests (18)
Microsoft.AspNetCore.Authentication.Test (33)
Microsoft.AspNetCore.CookiePolicy.Test (3)
Microsoft.AspNetCore.DataProtection (18)
Microsoft.AspNetCore.DataProtection.Tests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
Microsoft.AspNetCore.OpenApi.SourceGenerators (9)
Microsoft.AspNetCore.Rewrite (15)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (4)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Analyzers (20)
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
Microsoft.CodeAnalysis.BannedApiAnalyzers (19)
Microsoft.CodeAnalysis.CodeStyle (16)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.Features (8)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (19)
Microsoft.CodeAnalysis.PublicApiAnalyzers (19)
Microsoft.CodeAnalysis.ResxSourceGenerator (20)
Microsoft.CodeAnalysis.Test.Utilities (18)
Metadata\ILValidation.cs (18)
385let xmlTokenValue = e.Attribute("token")?.Value
394.Descendants().ToImmutableDictionary(e => e.Attribute("id").Value, e => e.Attribute("name").Value);
407add(Convert.ToInt32(e.Attribute("offset").Value, 16), (e.Attribute("hidden")?.Value == "true") ? "~" : "-");
415add(Convert.ToInt32(e.Attribute("yield").Value, 16), "<");
416add(Convert.ToInt32(e.Attribute("resume").Value, 16), ">");
420add(Convert.ToInt32(e.Attribute("offset").Value, 16), "$");
438add(Convert.ToInt32(e.Attribute("yield").Value, 16), "async: yield");
439add(Convert.ToInt32(e.Attribute("resume").Value, 16), "async: resume");
443add(Convert.ToInt32(e.Attribute("offset").Value, 16), "async: catch handler");
451var documentId = e.Attribute("document").Value;
454add(Convert.ToInt32(e.Attribute("offset").Value, 16), "sequence point: " + SnippetFromSpan(source, e));
463if (sequencePointXml.Attribute("hidden")?.Value == "true")
468var startLine = Convert.ToInt32(sequencePointXml.Attribute("startLine").Value) - 1;
469var startColumn = Convert.ToInt32(sequencePointXml.Attribute("startColumn").Value) - 1;
470var endLine = Convert.ToInt32(sequencePointXml.Attribute("endLine").Value) - 1;
471var endColumn = Convert.ToInt32(sequencePointXml.Attribute("endColumn").Value) - 1;
Microsoft.CodeAnalysis.Workspaces (21)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (52)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.DotNet.Arcade.Sdk (3)
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.Build.Tasks.Installers (8)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.MacOsPkg.Core (1)
Microsoft.DotNet.NuGetRepack.Tasks (3)
Microsoft.DotNet.SignTool.Tests (1)
Microsoft.DotNet.SourceBuild.Tasks (10)
Microsoft.DotNet.XliffTasks (22)
Microsoft.DotNet.XliffTasks.Tests (3)
Microsoft.Extensions.FileProviders.Embedded (1)
Microsoft.Maui.Resizetizer (21)
Microsoft.VisualStudio.LanguageServices (8)
Microsoft.VisualStudio.LanguageServices.Implementation (5)
Roslyn.Diagnostics.Analyzers (19)
Roslyn.Test.PdbUtilities (5)
RulesetToEditorconfigConverter (3)
System.ComponentModel.TypeConverter (1)
System.Private.CoreLib.Generators (21)
System.Private.Xml.Linq (6)
Test.Utilities (19)
Text.Analyzers (19)