Skip to content

Commit 501dd85

Browse files
authored
Merge pull request #148 from AvaloniaCommunity/feature/Prism9x-v9.0.401
v9.0.401-pre
2 parents 54cad66 + e744fa4 commit 501dd85

File tree

11 files changed

+48
-40
lines changed

11 files changed

+48
-40
lines changed

ChangeLog.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
Change log history for Prism.Avalonia
44

5+
## v9.0.401-pre (20204-04-13)
6+
7+
* Fixed typos
8+
* DynamicallyAccessedMembers Attribute for linker hints
9+
* Upgraded NuGet DryIoc to 5.4.3
10+
11+
## v9.0.271-pre (2024-04-12)
12+
13+
* Upgraded Prism.Core to v9.0.271-pre
14+
* Breaking Changes:
15+
* `Prism.Dialog`
16+
* `Prism.Region` -> `Prism.Navigation.Region`
17+
518
## v8.1.97.11072 (2024-01-27)
619

720
* Added support for .NET 8

Directory.Packages.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<!-- Prism -->
44
<ItemGroup>
55
<PackageVersion Include="Prism.Core" Version="9.0.271-pre" />
6-
<PackageVersion Include="Prism.Container.Abstractions" Version="9.0.61-pre" />
7-
<PackageVersion Include="Prism.Container.DryIoc" Version="9.0.61-pre" />
8-
<PackageVersion Include="Prism.Container.Unity" Version="9.0.61-pre" />
6+
<PackageVersion Include="Prism.Container.Abstractions" Version="9.0.84-pre" />
7+
<PackageVersion Include="Prism.Container.DryIoc" Version="9.0.84-pre" />
8+
<PackageVersion Include="Prism.Container.Unity" Version="9.0.84-pre" />
99
</ItemGroup>
1010

1111
<!-- Avalonia -->
@@ -22,7 +22,7 @@
2222

2323
<!-- 3rd-Party -->
2424
<ItemGroup>
25-
<PackageVersion Include="DryIoc.dll" Version="5.4.1" />
25+
<PackageVersion Include="DryIoc.dll" Version="5.4.3" />
2626
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
2727
<PackageVersion Include="System.Reactive" Version="6.0.0" />
2828
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
@@ -34,11 +34,11 @@
3434
<!-- Tests -->
3535
<ItemGroup>
3636
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
37-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
38-
<PackageVersion Include="Moq" Version="4.20.69" />
37+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
38+
<PackageVersion Include="Moq" Version="4.20.70" />
3939
<PackageVersion Include="System.CodeDom" Version="6.0.0" />
40-
<PackageVersion Include="xunit" Version="2.5.1" />
41-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.1"/>
40+
<PackageVersion Include="xunit" Version="2.6.6" />
41+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6"/>
4242
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
4343
</ItemGroup>
4444
</Project>

PrismLibrary_Avalonia.slnf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"src\\Prism.Avalonia\\Prism.Avalonia.csproj",
77
"src\\Prism.DryIoc.Avalonia\\Prism.DryIoc.Avalonia.csproj",
88
"tests\\Avalonia\\Prism.Avalonia.Tests\\Prism.Avalonia.Tests.csproj",
9-
"tests\\Avalonia\\Prism.Container.Avalonia.Shared\\Prism.Container.Avalonia.Shared.shproj",
109
"tests\\Avalonia\\Prism.DryIoc.Avalonia.Tests\\Prism.DryIoc.Avalonia.Tests.csproj",
11-
"tests\\Avalonia\\Prism.IocContainer.Avalonia.Tests.Support\\Prism.IocContainer.Avalonia.Tests.Support.csproj"
1210
]
1311
}
1412
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ Just like Prism.WPF or Prism.Maui, your project must reference both the Prism.Av
2828

2929
Choose the NuGet package version that matches your Avalonia version.
3030

31-
The Avalonia version of this package uses [SemVer](https://semver.org/) format: `MAJOR.MINOR.PATCH.REVISION`. The `REVISION` segment indicates
32-
the Avalonia version support. For instance `v8.1.97.11000` of this library supports, Avalonia v11.0.0.
31+
The Avalonia version of this package uses [SemVer](https://semver.org/) format: `MAJOR.MINOR.PATCH.REVISION`. The `REVISION` segment indicates the Avalonia version support. For instance `v8.1.97.11000` of this library supports, Avalonia v11.0.0.
32+
33+
> major[.minor[.build[.revision]]]
34+
> Assembly Version Attribute is limited to a `ushort` (65535) - [Ref](https://stackoverflow.com/a/73631971/249492).
3335
3436
| Avalonia Version | NuGet Package |
3537
|-|-|

build/Base.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project DefaultTargets="Build"
33
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<PropertyGroup>
5-
<Version>9.0.271.11074-pre</Version>
5+
<Version>9.0.401.11000-pre</Version>
66
<PackageProjectUrl>https://github.com/AvaloniaCommunity/Prism.Avalonia</PackageProjectUrl>
77
<Copyright>Copyright (c) 2024 Xeno Innovations, Inc.</Copyright>
88
<PackageLicenseExpression>MIT</PackageLicenseExpression>

e2e/SampleMvvmApp/RegionAdapters/ItemsControlRegionAdapter.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
63
using Avalonia.Controls;
74
using Prism.Navigation.Regions;
85

@@ -14,8 +11,6 @@ namespace SampleMvvmApp.RegionAdapters
1411
/// </summary>
1512
public class ItemsControlRegionAdapter : RegionAdapterBase<ItemsControl>
1613
{
17-
#region Public Constructors
18-
1914
/// <summary>
2015
/// Initializes a new instance of <see cref="ItemsControlRegionAdapter"/>.
2116
/// </summary>
@@ -27,10 +22,6 @@ public ItemsControlRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory)
2722
{
2823
}
2924

30-
#endregion Public Constructors
31-
32-
#region Protected Methods
33-
3425
/// <summary>
3526
/// Adapts an <see cref="ItemsControl"/> to an <see cref="IRegion"/>.
3627
/// </summary>
@@ -83,7 +74,5 @@ protected override IRegion CreateRegion()
8374
{
8475
return new AllActiveRegion();
8576
}
86-
87-
#endregion Protected Methods
8877
}
8978
}

src/Prism.Avalonia/Common/MvvmHelpers.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ view.DataContext is null &&
3333
////#endif
3434

3535
/// <summary>
36-
/// Perform an <see cref="Action{T}"/> on a view and viewmodel.
36+
/// Perform an <see cref="Action{T}"/> on a view and ViewModel.
3737
/// </summary>
3838
/// <remarks>
39-
/// The action will be performed on the view and its viewmodel if they implement <typeparamref name="T"/>.
39+
/// The action will be performed on the view and its ViewModel if they implement <typeparamref name="T"/>.
4040
/// </remarks>
4141
/// <typeparam name="T">The <see cref="Action{T}"/> parameter type.</typeparam>
4242
/// <param name="view">The view to perform the <see cref="Action{T}"/> on.</param>
@@ -53,15 +53,15 @@ public static void ViewAndViewModelAction<T>(object view, Action<T> action) wher
5353
}
5454

5555
/// <summary>
56-
/// Get an implementer from a view or viewmodel.
56+
/// Get an implementer from a view or ViewModel.
5757
/// </summary>
5858
/// <remarks>
5959
/// If the view implements <typeparamref name="T"/> it will be returned.
6060
/// Otherwise if the view's <see cref="FrameworkElement.DataContext"/> implements <typeparamref name="T"/> it will be returned instead.
6161
/// </remarks>
6262
/// <typeparam name="T">The implementer type to get.</typeparam>
6363
/// <param name="view">The view to get <typeparamref name="T"/> from.</param>
64-
/// <returns>view or viewmodel as <typeparamref name="T"/>.</returns>
64+
/// <returns>view or ViewModel as <typeparamref name="T"/>.</returns>
6565
public static T GetImplementerFromViewOrViewModel<T>(object view) where T : class
6666
{
6767
if (view is T viewAsT)

src/Prism.Avalonia/Ioc/IContainerRegistryExtensions.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Diagnostics.CodeAnalysis;
23
using Prism.Mvvm;
34

45
namespace Prism.Ioc
@@ -14,7 +15,7 @@ public static class IContainerRegistryExtensions
1415
/// <typeparam name="TView">The Type of object to register as the dialog</typeparam>
1516
/// <param name="containerRegistry"></param>
1617
/// <param name="name">The unique name to register with the dialog.</param>
17-
public static void RegisterDialog<TView>(this IContainerRegistry containerRegistry, string name = null)
18+
public static void RegisterDialog<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TView>(this IContainerRegistry containerRegistry, string name = null)
1819
{
1920
containerRegistry.RegisterForNavigation<TView>(name);
2021
}
@@ -26,7 +27,7 @@ public static void RegisterDialog<TView>(this IContainerRegistry containerRegist
2627
/// <typeparam name="TViewModel">The ViewModel to use as the DataContext for the dialog</typeparam>
2728
/// <param name="containerRegistry"></param>
2829
/// <param name="name">The unique name to register with the dialog.</param>
29-
public static void RegisterDialog<TView, TViewModel>(this IContainerRegistry containerRegistry, string name = null) where TViewModel : Dialogs.IDialogAware
30+
public static void RegisterDialog<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TView, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TViewModel>(this IContainerRegistry containerRegistry, string name = null) where TViewModel : Dialogs.IDialogAware
3031
{
3132
containerRegistry.RegisterForNavigation<TView, TViewModel>(name);
3233
}
@@ -36,7 +37,7 @@ public static void RegisterDialog<TView, TViewModel>(this IContainerRegistry con
3637
/// </summary>
3738
/// <typeparam name="TWindow">The Type of the Window class that will be used to host dialogs in the IDialogService</typeparam>
3839
/// <param name="containerRegistry"></param>
39-
public static void RegisterDialogWindow<TWindow>(this IContainerRegistry containerRegistry) where TWindow : Dialogs.IDialogWindow
40+
public static void RegisterDialogWindow<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TWindow>(this IContainerRegistry containerRegistry) where TWindow : Dialogs.IDialogWindow
4041
{
4142
containerRegistry.Register(typeof(Dialogs.IDialogWindow), typeof(TWindow));
4243
}
@@ -47,7 +48,7 @@ public static void RegisterDialogWindow<TWindow>(this IContainerRegistry contain
4748
/// <typeparam name="TWindow">The Type of the Window class that will be used to host dialogs in the IDialogService</typeparam>
4849
/// <param name="containerRegistry"></param>
4950
/// <param name="name">The name of the dialog window</param>
50-
public static void RegisterDialogWindow<TWindow>(this IContainerRegistry containerRegistry, string name) where TWindow : Dialogs.IDialogWindow
51+
public static void RegisterDialogWindow<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TWindow>(this IContainerRegistry containerRegistry, string name) where TWindow : Dialogs.IDialogWindow
5152
{
5253
containerRegistry.Register(typeof(Dialogs.IDialogWindow), typeof(TWindow), name);
5354
}
@@ -69,7 +70,7 @@ public static void RegisterForNavigation(this IContainerRegistry containerRegist
6970
/// <typeparam name="T">The Type of the object to register as the view</typeparam>
7071
/// <param name="containerRegistry"></param>
7172
/// <param name="name">The unique name to register with the object.</param>
72-
public static void RegisterForNavigation<T>(this IContainerRegistry containerRegistry, string name = null)
73+
public static void RegisterForNavigation<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(this IContainerRegistry containerRegistry, string name = null)
7374
{
7475
Type type = typeof(T);
7576
string viewName = string.IsNullOrWhiteSpace(name) ? type.Name : name;
@@ -83,12 +84,12 @@ public static void RegisterForNavigation<T>(this IContainerRegistry containerReg
8384
/// <typeparam name="TViewModel">The ViewModel to use as the DataContext for the view</typeparam>
8485
/// <param name="containerRegistry"></param>
8586
/// <param name="name">The unique name to register with the view</param>
86-
public static void RegisterForNavigation<TView, TViewModel>(this IContainerRegistry containerRegistry, string name = null)
87+
public static void RegisterForNavigation<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TView, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TViewModel>(this IContainerRegistry containerRegistry, string name = null)
8788
{
8889
containerRegistry.RegisterForNavigationWithViewModel<TViewModel>(typeof(TView), name);
8990
}
9091

91-
private static void RegisterForNavigationWithViewModel<TViewModel>(this IContainerRegistry containerRegistry, Type viewType, string name)
92+
private static void RegisterForNavigationWithViewModel<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TViewModel>(this IContainerRegistry containerRegistry, Type viewType, string name)
9293
{
9394
if (string.IsNullOrWhiteSpace(name))
9495
name = viewType.Name;

src/Prism.Avalonia/Navigation/Regions/RegionAdapterMappings.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics.CodeAnalysis;
34
using System.Globalization;
45
using Prism.Ioc;
56
using Prism.Properties;
@@ -49,7 +50,7 @@ public void RegisterMapping<TControl>(IRegionAdapter adapter)
4950
/// </summary>
5051
/// <typeparam name="TControl">The type of the control</typeparam>
5152
/// <typeparam name="TAdapter">The type of the IRegionAdapter to use with the TControl</typeparam>
52-
public void RegisterMapping<TControl, TAdapter>() where TAdapter : IRegionAdapter
53+
public void RegisterMapping<TControl, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] TAdapter>() where TAdapter : IRegionAdapter
5354
{
5455
RegisterMapping(typeof(TControl), ContainerLocator.Container.Resolve<TAdapter>());
5556
}

src/Prism.Avalonia/Prism.Avalonia.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ Prism.Avalonia helps you more easily design and build rich, flexible, and easy t
4545

4646
<ItemGroup>
4747
<PackageReference Include="System.Configuration.ConfigurationManager" />
48-
<!--<PackageReference Include="Avalonia" />
49-
<PackageReference Include="Avalonia.Markup.Xaml.Loader" />
50-
<PackageReference Include="Avalonia.ReactiveUI" />-->
5148
</ItemGroup>
5249

5350
<ItemGroup>

0 commit comments

Comments
 (0)