Skip to content

Commit 2531674

Browse files
authored
Merge pull request #173 from reactivemarbles/CP_UpdateReactiveUI
Update ReactiveUI add AOT markup
2 parents 969d5d3 + 5fc7e6f commit 2531674

21 files changed

+90
-74
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
3131
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
3232
<AvaloniaVersion>11.2.5</AvaloniaVersion>
33-
<ReactiveUIVersion>20.1.63</ReactiveUIVersion>
33+
<ReactiveUIVersion>20.2.45</ReactiveUIVersion>
3434
<XamarinReactiveUIVersion>19.6.12</XamarinReactiveUIVersion>
3535
<WebViewVersion>1.0.3124.44</WebViewVersion>
3636
<CrissCrossCoreTargetFrameworks>netstandard2.0;net8.0;net9.0</CrissCrossCoreTargetFrameworks>

Version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"publicReleaseRefSpec": [
55
"^refs/heads/master$",
66
"^refs/heads/main$"

src/CrissCross.MAUI.Test/CrissCross.MAUI.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
5555
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.3" />
5656
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.3" />
57-
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.40" />
58-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.40" />
57+
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.50" />
58+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.50" />
5959
</ItemGroup>
6060

6161
<ItemGroup>

src/CrissCross.MAUI/CrissCross.MAUI.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
1616
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
1717
</PropertyGroup>
18+
<PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0')) or $(TargetFramework.StartsWith('net9.0'))">
19+
<IsAotCompatible>true</IsAotCompatible>
20+
</PropertyGroup>
1821
<ItemGroup>
1922
<PackageReference Include="CompiledBindings.MAUI" Version="1.0.18" />
2023
<PackageReference Include="ReactiveUI.Maui" Version="$(ReactiveUIVersion)" />
@@ -26,8 +29,8 @@
2629
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.100" />
2730
</ItemGroup>
2831
<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
29-
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.40" />
30-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.40" />
32+
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.50" />
33+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.50" />
3134
</ItemGroup>
3235
<ItemGroup>
3336
<ProjectReference Include="..\CrissCross\CrissCross.csproj" />

src/CrissCross.MAUI/NavigationShell.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System.Collections.ObjectModel;
66
using System.Diagnostics;
7+
using System.Diagnostics.CodeAnalysis;
78
using System.Reactive.Linq;
89
using System.Reactive.Subjects;
910
using System.Reflection;
@@ -21,6 +22,10 @@ namespace CrissCross.MAUI;
2122
/// <seealso cref="ISetNavigation" />
2223
/// <seealso cref="IViewModelRoutedViewHost" />
2324
/// <seealso cref="IUseNavigation" />
25+
#if NET8_0_OR_GREATER
26+
[RequiresDynamicCode("The method uses reflection and will not work in AOT environments.")]
27+
[RequiresUnreferencedCode("The method uses reflection and will not work in AOT environments.")]
28+
#endif
2429
public class NavigationShell : Shell, ISetNavigation, IViewModelRoutedViewHost, IUseNavigation, IDisposable
2530
{
2631
/// <summary>

src/CrissCross.WPF.Plot/CrissCross.WPF.Plot.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="AppBarButton.WPF" Version="1.0.2" />
1616
<PackageReference Include="ReactiveList" Version="2.2.0" />
1717
<PackageReference Include="ReactiveMarbles.ObservableEvents.SourceGenerator" Version="1.3.1" PrivateAssets="all" />
18-
<PackageReference Include="ReactiveUI.SourceGenerators" Version="2.1.8" PrivateAssets="all" />
18+
<PackageReference Include="ReactiveUI.SourceGenerators" Version="2.1.27" PrivateAssets="all" />
1919
<PackageReference Include="ScottPlot.WPF" Version="5.0.54" />
2020
</ItemGroup>
2121

src/CrissCross.WPF.Plot/Live/AxisLinesUI.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// ReactiveUI Association Incorporated licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for full license information.
44

5-
using System.Drawing;
65
using System.Reactive.Disposables;
76
using System.Reactive.Linq;
87
using ReactiveUI;
@@ -133,6 +132,11 @@ public AxisLinesUI(
133132
/// <param name="position">The position.</param>
134133
public void CreateVerticalLine(double position = 0.0)
135134
{
135+
if (string.IsNullOrWhiteSpace(ChartSettings.Color))
136+
{
137+
return;
138+
}
139+
136140
var color = ScottPlot.Color.FromColor(System.Drawing.Color.FromName(ChartSettings.Color));
137141
AxisLine = Plot.Plot.Add.VerticalLine(x: position, width: (float)ChartSettings.LineWidth, color: color);
138142
////AxisLine.Text = LabelText;
@@ -147,6 +151,11 @@ public void CreateVerticalLine(double position = 0.0)
147151
/// <param name="position">The position.</param>
148152
public void CreateHorizontalLine(double position = 0.0)
149153
{
154+
if (string.IsNullOrWhiteSpace(ChartSettings.Color))
155+
{
156+
return;
157+
}
158+
150159
var color = ScottPlot.Color.FromColor(System.Drawing.Color.FromName(ChartSettings.Color));
151160
AxisLine = Plot.Plot.Add.HorizontalLine(y: position, width: (float)ChartSettings.LineWidth, color: color);
152161
////AxisLine.Text = LabelText;
@@ -211,9 +220,8 @@ private void AppearanceSubsriptions()
211220
AxisLine.IsVisible = x.Item3 != "Invisible";
212221
Plot.Refresh();
213222
}).DisposeWith(Disposables);
214-
this.WhenAnyValue(x => x.ChartSettings.IsChecked).Subscribe(x =>
215-
{
216-
ChartSettings.Visibility = x == true ? "Invisible" : "Visible";
217-
}).DisposeWith(Disposables);
223+
this.WhenAnyValue(x => x.ChartSettings.IsChecked)
224+
.Subscribe(x => ChartSettings.Visibility = x == true ? "Invisible" : "Visible")
225+
.DisposeWith(Disposables);
218226
}
219227
}

src/CrissCross.WPF.Plot/Live/DataLoggerUI.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,8 @@ private void AppearanceSubsriptions()
255255
DataLogger.IsVisible = x.Item3 == "Invisible";
256256
Plot.Refresh();
257257
}).DisposeWith(Disposables);
258-
this.WhenAnyValue(x => x.ChartSettings.IsChecked).Subscribe(x =>
259-
{
260-
ChartSettings.Visibility = x == true ? "Invisible" : "Visible";
261-
}).DisposeWith(Disposables);
258+
this.WhenAnyValue(x => x.ChartSettings.IsChecked)
259+
.Subscribe(x => ChartSettings.Visibility = x == true ? "Invisible" : "Visible")
260+
.DisposeWith(Disposables);
262261
}
263262
}

src/CrissCross.WPF.Plot/Live/IData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ namespace CrissCross.WPF.Plot;
77
/// <summary>
88
/// Interface IData.
99
/// </summary>
10-
/// <seealso cref="CrissCross.RxObject" />
10+
/// <seealso cref="RxObject" />
1111
public partial class IData : RxObject;

src/CrissCross.WPF.Plot/Live/RightPropertiesV2ViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public partial class RightPropertiesV2ViewModel : RxObject
2424
[Reactive]
2525
private double _lineWidth;
2626
[Reactive]
27-
private string _lineColor;
27+
private string? _lineColor;
2828

2929
/// <summary>
3030
/// Initializes a new instance of the <see cref="RightPropertiesV2ViewModel"/> class.

0 commit comments

Comments
 (0)