Skip to content

Commit

Permalink
Add missing Trimming annotations. (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Petit <kevin.petit@hacksis.dev>
  • Loading branch information
kvpt and Kevin Petit authored Feb 26, 2024
1 parent f6cd400 commit 6af744c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Extensions.Hosting.AsyncInitialization;
Expand Down Expand Up @@ -33,7 +34,7 @@ public static IServiceCollection AddAsyncInitialization(this IServiceCollection
/// <param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection" /> to add the service to.</param>
/// <param name="lifetime">The initializer's lifetime. Defaults to <see cref="ServiceLifetime.Transient"/>.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static IServiceCollection AddAsyncInitializer<TInitializer>(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Transient)
public static IServiceCollection AddAsyncInitializer<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]TInitializer>(this IServiceCollection services, ServiceLifetime lifetime = ServiceLifetime.Transient)
where TInitializer : class, IAsyncInitializer
{
return services
Expand Down Expand Up @@ -83,7 +84,7 @@ public static IServiceCollection AddAsyncInitializer(this IServiceCollection ser
/// <param name="initializerType">The type of the async initializer to add.</param>
/// <param name="lifetime">The initializer's lifetime. Defaults to <see cref="ServiceLifetime.Transient"/>.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static IServiceCollection AddAsyncInitializer(this IServiceCollection services, Type initializerType, ServiceLifetime lifetime = ServiceLifetime.Transient)
public static IServiceCollection AddAsyncInitializer(this IServiceCollection services, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]Type initializerType, ServiceLifetime lifetime = ServiceLifetime.Transient)
{
if (initializerType == null)
throw new ArgumentNullException(nameof(initializerType));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageTags>.net core;hosting;async;initialization</PackageTags>
<RepositoryUrl>https://github.com/thomaslevesque/Extensions.Hosting.AsyncInitialization</RepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 6af744c

Please sign in to comment.