719 references to Attribute
aspire (49)
Packaging\NuGetConfigMerger.cs (40)
196var key = (string?)addElement.Attribute("key");
197var value = (string?)addElement.Attribute("value");
209.Select(e => (string?)e.Attribute("value") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
211.Select(e => (string?)e.Attribute("key") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
258var sourceKey = (string?)packageSourceElement.Attribute("key");
269var pattern = (string?)packageElement.Attribute("pattern");
343.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), keyToUse, StringComparison.OrdinalIgnoreCase));
358.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), pattern, StringComparison.OrdinalIgnoreCase));
384var pattern = (string?)packageElement.Attribute("pattern");
406.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), keyToUse, StringComparison.OrdinalIgnoreCase));
421.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), mapping.PackageFilter, StringComparison.OrdinalIgnoreCase));
444var key = (string?)ps.Attribute("key");
452var urlKey = (string?)elementToFix.Attribute("key");
457.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), properKey, StringComparison.OrdinalIgnoreCase));
466var pattern = (string?)packageToMove.Attribute("pattern");
468.FirstOrDefault(p => string.Equals((string?)p.Attribute("pattern"), pattern, StringComparison.OrdinalIgnoreCase));
504.Select(add => (string?)add.Attribute("key"))
512.Select(ps => (string?)ps.Attribute("key"))
529var originalSourceKey = (string?)ps.Attribute("key");
553.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
554var sourceValue = (string?)sourceElement?.Attribute("value");
582.Where(ps => ps.Elements("package").Any() && !ps.Elements("package").Any(p => (string?)p.Attribute("pattern") == "*"))
583.Select(ps => (string?)ps.Attribute("key"))
592.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
593var sourceValue = (string?)sourceElement?.Attribute("value");
601.FirstOrDefault(ps => string.Equals((string?)ps.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
699var sourceKey = (string?)emptyElement.Attribute("key");
715.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase) ||
716string.Equals((string?)add.Attribute("value"), sourceKey, StringComparison.OrdinalIgnoreCase));
760.Select(add => (string?)add.Attribute("key"))
767.Select(ps => (string?)ps.Attribute("key"))
780.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), sourceKey, StringComparison.OrdinalIgnoreCase));
781var sourceValue = (string?)sourceElement?.Attribute("value");
847.Select(e => (string?)e.Attribute("value") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
849.Select(e => (string?)e.Attribute("key") ?? string.Empty), StringComparer.OrdinalIgnoreCase);
855var key = (string?)addElement.Attribute("key");
856var value = (string?)addElement.Attribute("value");
884var sourceKey = (string?)packageSourceElement.Attribute("key");
893var pattern = (string?)packageElement.Attribute("pattern");
975.FirstOrDefault(add => string.Equals((string?)add.Attribute("key"), "globalPackagesFolder", StringComparison.OrdinalIgnoreCase));
Aspire.Cli.Tests (44)
Packaging\NuGetConfigMergerTests.cs (42)
94Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed1.example");
95Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
135Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
139Assert.NotNull(psm.Elements("packageSource").First().Elements("package").FirstOrDefault(p => (string?)p.Attribute("pattern") == "Aspire.*"));
175Assert.DoesNotContain(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://old.example");
177Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://new.example");
181Assert.Equal("https://new.example", (string?)psm.Element("packageSource")!.Attribute("key"));
182Assert.Equal("Lib.*", (string?)psm.Element("packageSource")!.Element("package")!.Attribute("pattern"));
326Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget" && (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
327Assert.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");
330Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-feed");
334var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget");
336Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
339var urlMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://api.nuget.org/v3/index.json");
376Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
377Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "custom");
380Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
392var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
394Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
397var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
399Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
401var customMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "custom");
403Assert.Contains(customMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
445Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
448Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
458var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
460Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
463var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
465Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
466Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
512e => (string?)e.Attribute("value") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
516e => (string?)e.Attribute("value") == "https://valid.example");
520e => (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
526ps => (string?)ps.Attribute("key") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
530.FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://valid.example");
532Assert.Contains(validExampleMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
536.FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://api.nuget.org/v3/index.json");
538Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
539Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
540Assert.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 (19)
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.SetupNugetSources.Tests (10)
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 (1)
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)