Skip to content

Commit

Permalink
chore: adding DynamicallyAccessedMembers
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jan 4, 2024
1 parent 85e6f2a commit 86d52d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Prism.Ioc;
using Prism.Properties;
Expand Down Expand Up @@ -49,7 +50,7 @@ public void RegisterMapping<TControl>(IRegionAdapter adapter)
/// </summary>
/// <typeparam name="TControl">The type of the control</typeparam>
/// <typeparam name="TAdapter">The type of the IRegionAdapter to use with the TControl</typeparam>
public void RegisterMapping<TControl, TAdapter>() where TAdapter : IRegionAdapter
public void RegisterMapping<TControl, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TAdapter>() where TAdapter : IRegionAdapter
{
RegisterMapping(typeof(TControl), ContainerLocator.Container.Resolve<TAdapter>());
}
Expand Down
4 changes: 4 additions & 0 deletions src/Wpf/Prism.Wpf/Prism.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Prism.Wpf helps you more easily design and build rich, flexible, and easy to mai

<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" />
<PackageReference Include="PolySharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 86d52d8

Please sign in to comment.