229 references to Elements
aspire (32)
Aspire.Cli.Tests (44)
Packaging\NuGetConfigMergerTests.cs (43)
95Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed1.example");
96Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
100Assert.Equal(2, psm!.Elements("packageSource").Count());
136Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
140Assert.NotNull(psm.Elements("packageSource").First().Elements("package").FirstOrDefault(p => (string?)p.Attribute("pattern") == "Aspire.*"));
176Assert.DoesNotContain(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://old.example");
178Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://new.example");
181Assert.Single(psm.Elements("packageSource"));
216Assert.Equal(2, psm!.Elements("packageSource").Count());
327Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget" && (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
328Assert.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");
331Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-feed");
335var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget");
337Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
340var urlMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://api.nuget.org/v3/index.json");
377Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
378Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "custom");
381Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
393var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
395Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
398var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
400Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
402var customMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "custom");
404Assert.Contains(customMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
446Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
449Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
459var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
461Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
464var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://example.com/aspire-daily");
466Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
467Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
512Assert.DoesNotContain(packageSources.Elements("add"),
516Assert.Contains(packageSources.Elements("add"),
520Assert.Contains(packageSources.Elements("add"),
526Assert.DoesNotContain(psm.Elements("packageSource"),
530var validExampleMapping = psm.Elements("packageSource")
533Assert.Contains(validExampleMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
536var nugetMapping = psm.Elements("packageSource")
539Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
540Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
541Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
544Assert.Equal(2, psm.Elements("packageSource").Count());
dotnet (3)
dotnet-svcutil-lib (6)
GenerateDocumentationAndConfigFiles (9)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.AspNetCore.Rewrite (4)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Analyzers (10)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.ResxSourceGenerator (10)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Manifest (3)
Microsoft.DotNet.Build.Tasks.Installers (4)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.MacOsPkg.Core (1)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.DotNet.XliffTasks (7)
Microsoft.Maui.Resizetizer (3)
Microsoft.NET.Build.Tasks (5)
Microsoft.NET.Sdk.Publish.Tasks (3)
NuGet.PackageManagement (1)
NuGet.Packaging (29)
NuspecReader.cs (13)
124.Elements(XName.Get(Dependencies, ns));
137.Elements(XName.Get(Dependency, ns));
172foreach (var group in MetadataNode.Elements(XName.Get(References, ns)).Elements(XName.Get(Group, ns)))
178var items = group.Elements(XName.Get(Reference, ns)).Select(n => GetAttributeValue(n, File)!).Where(n => !string.IsNullOrEmpty(n)).ToArray();
188var items = MetadataNode.Elements(XName.Get(References, ns))
220foreach (var group in MetadataNode.Elements(XName.Get(FrameworkAssemblies, ns)).Elements(XName.Get(FrameworkAssembly, ns))
273var node = MetadataNode.Elements(XName.Get(Language, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
282var node = MetadataNode.Elements(XName.Get(LicenseUrl, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
294.Elements(XName.Get(ContentFiles, ns))
414var node = MetadataNode.Elements(XName.Get(Repository, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
436var licenseNode = MetadataNode.Elements(XName.Get(NuspecUtility.License, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
582var node = MetadataNode.Elements(XName.Get(Icon, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
592var node = MetadataNode.Elements(XName.Get(Readme, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
NuGet.Protocol (4)
Roslyn.Diagnostics.Analyzers (9)
sdk-tasks (3)
System.ComponentModel.TypeConverter (1)
System.Private.CoreLib.Generators (5)