Skip to content

Commit

Permalink
Add [DynamicallyAccessedMembers] to ITypeRegistrar
Browse files Browse the repository at this point in the history
  • Loading branch information
codymullins committed Apr 17, 2024
1 parent de04619 commit 3ae5dfb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Spectre.Console.Cli/ITypeRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ namespace Spectre.Console.Cli;
/// </summary>
public interface ITypeRegistrar
{
#if NETSTANDARD2_0
/// <summary>
/// Registers the specified service.
/// </summary>
/// <param name="service">The service.</param>
/// <param name="implementation">The implementation.</param>
void Register(Type service, Type implementation);

#else
/// <summary>
/// Registers the specified service.
/// </summary>
/// <param name="service">The service.</param>
/// <param name="implementation">The implementation.</param>
void Register(Type service, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type implementation);
#endif

/// <summary>
/// Registers the specified instance.
/// </summary>
Expand Down

0 comments on commit 3ae5dfb

Please sign in to comment.