Skip to content

Commit

Permalink
Fix one place where service discovery isn't AOT compatible (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl authored and eerhardt committed Oct 27, 2023
1 parent 56fad8f commit abf00b5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
<IsPackable>true</IsPackable>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
<IsPackable>true</IsPackable>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ private ResolutionStatus ResolveInternal(ServiceEndPointCollectionSource endPoin

// Read the endpoint from the configuration.
// First check if there is a collection of sections
if (section.GetChildren().Any())
var children = section.GetChildren();
if (children.Any())
{
var values = section.Get<List<string>>();
var values = children.Select(c => c.Value!).Where(s => !string.IsNullOrEmpty(s)).ToList();
if (values is { Count: > 0 })
{
// Use schemes if any of the URIs have a scheme set.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
<IsPackable>true</IsPackable>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit abf00b5

Please sign in to comment.