Skip to content

Commit

Permalink
Add unreferenced code annotations to JS.E.AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
hwoodiwiss committed Feb 22, 2024
1 parent 0f4cb43 commit 61aa172
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/JustSaying.Extensions.Aws/IServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace Microsoft.Extensions.DependencyInjection;
[EditorBrowsable(EditorBrowsableState.Never)]
public static class IServiceCollectionExtensions
{
private const string AttributeRequiresUnreferencedCodeMessage = "The AWSSDK.Extensions.NETCore.Setup package has not been updated to support Native AOT compilations";

/// <summary>
/// Adds JustSaying services to the service collection using AWS configuration.
/// </summary>
Expand All @@ -27,6 +29,9 @@ public static class IServiceCollectionExtensions
/// <exception cref="ArgumentNullException">
/// <paramref name="services"/>, <paramref name="configuration"/> or <paramref name="builderConfig"/> is <see langword="null"/>.
/// </exception>
#if NET8_0_OR_GREATER
[RequiresUnreferencedCode(AttributeRequiresUnreferencedCodeMessage)]
#endif
public static void AddJustSayingWithAwsConfig(this IServiceCollection services, IConfiguration configuration, Action<MessagingBusBuilder> builderConfig)
{
if (services is null)
Expand Down Expand Up @@ -59,6 +64,9 @@ public static void AddJustSayingWithAwsConfig(this IServiceCollection services,
/// <exception cref="ArgumentNullException">
/// <paramref name="services"/>, <paramref name="configuration"/> or <paramref name="builderConfig"/> is <see langword="null"/>.
/// </exception>
#if NET8_0_OR_GREATER
[RequiresUnreferencedCode(AttributeRequiresUnreferencedCodeMessage)]
#endif
public static void AddJustSayingWithAwsConfig(this IServiceCollection services, IConfiguration configuration, Action<MessagingBusBuilder, IServiceProvider> builderConfig)
{
if (services is null)
Expand Down

0 comments on commit 61aa172

Please sign in to comment.