Skip to content

Commit

Permalink
Enable AOT compatibility for Yarp.Telemetry.Consumption
Browse files Browse the repository at this point in the history
Also fix a simple warning in Yarp.Kubernetes.Controller. The rest of the warnings in this project will be addressed in #2145.
  • Loading branch information
eerhardt committed May 24, 2023
1 parent 7ef8164 commit d6fee86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System;
using System.Diagnostics.CodeAnalysis;
using k8s;
using k8s.Models;
using Microsoft.Extensions.Configuration;
Expand Down Expand Up @@ -122,7 +123,7 @@ public static IServiceCollection RegisterResourceInformer<TResource, TService>(t
/// <param name="services">The services.</param>
/// <param name="fieldSelector">A field selector to constrain the resources the informer retrieves.</param>
/// <returns>IServiceCollection.</returns>
public static IServiceCollection RegisterResourceInformer<TResource, TService>(this IServiceCollection services, string fieldSelector)
public static IServiceCollection RegisterResourceInformer<TResource, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TService>(this IServiceCollection services, string fieldSelector)
where TResource : class, IKubernetesObject<V1ObjectMeta>, new()
where TService : IResourceInformer<TResource>
{
Expand Down
1 change: 1 addition & 0 deletions src/TelemetryConsumption/Yarp.Telemetry.Consumption.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Yarp.Telemetry.Consumption</RootNamespace>
<Nullable>enable</Nullable>
<IsAotCompatible>true</IsAotCompatible>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down

0 comments on commit d6fee86

Please sign in to comment.