diff --git a/Directory.Build.props b/Directory.Build.props index d72190272..fef8d15b9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,13 +1,46 @@ 2.0.1 true + + 2.3.0-prerelease.251115.2 + + + + + + true + + + true + + + false + + + true + + + + diff --git a/samples/Reactor.TestApp/Demos/SpecializedEditorsDemo.cs b/samples/Reactor.TestApp/Demos/SpecializedEditorsDemo.cs index 5be3eacf8..a491e427f 100644 --- a/samples/Reactor.TestApp/Demos/SpecializedEditorsDemo.cs +++ b/samples/Reactor.TestApp/Demos/SpecializedEditorsDemo.cs @@ -252,7 +252,7 @@ static FieldDescriptor[] BuildExplicitColumns() => // Explicit: only offer three of the four enum values here. TypedColumns.ComboBoxColumn( "Priority", g => g.Priority, - choices: [GizmoPriority.Low, GizmoPriority.Medium, GizmoPriority.High], + choices: (GizmoPriority[])[GizmoPriority.Low, GizmoPriority.Medium, GizmoPriority.High], width: 110), TypedColumns.HyperlinkColumn("Website", g => g.Website, width: 200), TypedColumns.ColorColumn("AccentColor", g => g.AccentColor, diff --git a/samples/ReactorCharting.Gallery/Samples/CandlestickChart.cs b/samples/ReactorCharting.Gallery/Samples/CandlestickChart.cs index 59848e8f2..43a0aae34 100644 --- a/samples/ReactorCharting.Gallery/Samples/CandlestickChart.cs +++ b/samples/ReactorCharting.Gallery/Samples/CandlestickChart.cs @@ -98,7 +98,7 @@ .. D3Axes(xs, ys, left, top, width, height), .. Enumerable.Range(0, 4).Select(n => n * 5) .Select(i => D3Charts.Text(xs.Map(i) - 12, top + height + 4, $"Day {i + 1}", 10, ChartMutedForeground)), D3Charts.Text(2, top - 14, "Price", 11, ChartMutedForeground), - .. D3Legend(left + width - 120, top + 5, [("Bullish", bullBrush), ("Bearish", bearBrush)])] + .. D3Legend(left + width - 120, top + 5, ((string, Microsoft.UI.Xaml.Media.SolidColorBrush)[])[("Bullish", bullBrush), ("Bearish", bearBrush)])] ) .AutomationName("Stock Price Candlestick Chart") .FullDescription("Candlestick chart showing 20 trading days of OHLC price data, with green candles for bullish and red for bearish days."); diff --git a/samples/ReactorCharting.Gallery/Samples/CirclePacking.cs b/samples/ReactorCharting.Gallery/Samples/CirclePacking.cs index 048b0f7c2..7af8f3947 100644 --- a/samples/ReactorCharting.Gallery/Samples/CirclePacking.cs +++ b/samples/ReactorCharting.Gallery/Samples/CirclePacking.cs @@ -106,7 +106,7 @@ .. allNodes.SelectMany(node => }; } - return [circle]; + return (Element[])[circle]; } else { diff --git a/samples/ReactorCharting.Gallery/Samples/DifferenceChart.cs b/samples/ReactorCharting.Gallery/Samples/DifferenceChart.cs index 90794a441..0cb5e03c3 100644 --- a/samples/ReactorCharting.Gallery/Samples/DifferenceChart.cs +++ b/samples/ReactorCharting.Gallery/Samples/DifferenceChart.cs @@ -85,7 +85,7 @@ public override Element Render() stroke: greenBrush, strokeWidth: 2, curve: D3Curve.MonotoneX), D3LinePath(data, x: d => xScale.Map(d.X), y: d => yScale.Map(d.B), stroke: redBrush, strokeWidth: 2, curve: D3Curve.MonotoneX), - .. D3Legend(lx, marginTop + 6, [("Revenue", greenBrush), ("Expenses", redBrush)]), + .. D3Legend(lx, marginTop + 6, ((string, Microsoft.UI.Xaml.Media.SolidColorBrush)[])[("Revenue", greenBrush), ("Expenses", redBrush)]), Microsoft.UI.Reactor.Charting.D3Charts.Text(marginLeft, 4, "Difference Chart (Revenue vs Expenses)", 14, ChartForeground), ]) .AutomationName("Difference Chart (Revenue vs Expenses)") diff --git a/samples/ReactorCharting.Gallery/Samples/DivergingBarChart.cs b/samples/ReactorCharting.Gallery/Samples/DivergingBarChart.cs index b8d628646..aecc1e81c 100644 --- a/samples/ReactorCharting.Gallery/Samples/DivergingBarChart.cs +++ b/samples/ReactorCharting.Gallery/Samples/DivergingBarChart.cs @@ -105,7 +105,7 @@ .. items.Select((item, i) => TextRight(2, top + band.Map(item) + band.Bandwidth / 2 - 7, item, left - 6, 10, ChartMutedForeground)), // Legend - .. D3Legend(left + plotW - 120, top + 2, [("Positive", posBrush), ("Negative", negBrush)]), + .. D3Legend(left + plotW - 120, top + 2, ((string, Microsoft.UI.Xaml.Media.SolidColorBrush)[])[("Positive", posBrush), ("Negative", negBrush)]), D3Charts.Text(left, 4, "Customer Sentiment Scores", 13, ChartForeground), ] diff --git a/samples/ReactorCharting.Gallery/Samples/SlopeChart.cs b/samples/ReactorCharting.Gallery/Samples/SlopeChart.cs index 696cd9a9e..aab9b50b2 100644 --- a/samples/ReactorCharting.Gallery/Samples/SlopeChart.cs +++ b/samples/ReactorCharting.Gallery/Samples/SlopeChart.cs @@ -89,7 +89,7 @@ .. items.SelectMany(item => }), // Legend - .. D3Legend(canvasW / 2 - 80, canvasH - 22, [("Improved", Brush(Palette[2])), ("Declined", Brush(Palette[3]))]), + .. D3Legend(canvasW / 2 - 80, canvasH - 22, ((string, Microsoft.UI.Xaml.Media.SolidColorBrush)[])[("Improved", Brush(Palette[2])), ("Declined", Brush(Palette[3]))]), ] ) .AutomationName("Department Performance: Before vs After") diff --git a/samples/TodoApp/Program.cs b/samples/TodoApp/Program.cs index 95f7d628d..a4bd6eed1 100644 --- a/samples/TodoApp/Program.cs +++ b/samples/TodoApp/Program.cs @@ -45,21 +45,21 @@ static class TodoReducer AddItem when !string.IsNullOrWhiteSpace(state.NewItemText) => state with { - Items = [.. state.Items, new(Guid.NewGuid().ToString(), state.NewItemText.Trim(), false)], + Items = (TodoItem[])[.. state.Items, new(Guid.NewGuid().ToString(), state.NewItemText.Trim(), false)], NewItemText = "" }, ToggleItem t => state with { - Items = [.. state.Items.Select(i => + Items = (TodoItem[])[.. state.Items.Select(i => i.Id == t.Id ? i with { IsCompleted = !i.IsCompleted } : i)] }, DeleteItem d => state with { - Items = [.. state.Items.Where(i => i.Id != d.Id)] + Items = (TodoItem[])[.. state.Items.Where(i => i.Id != d.Id)] }, SetNewItemText s => state with { NewItemText = s.Text }, SetFilter f => state with { Filter = f.Filter }, - ClearCompleted => state with { Items = [.. state.Items.Where(i => !i.IsCompleted)] }, + ClearCompleted => state with { Items = (TodoItem[])[.. state.Items.Where(i => !i.IsCompleted)] }, _ => state }; } diff --git a/src/Reactor/Charting/Charts.Tree.cs b/src/Reactor/Charting/Charts.Tree.cs index 0c6c35aa2..508a27af7 100644 --- a/src/Reactor/Charting/Charts.Tree.cs +++ b/src/Reactor/Charting/Charts.Tree.cs @@ -166,7 +166,7 @@ IReadOnlyList IChartAccessibilityData.Series return new ChartPointDescriptor(label, node.Depth); }).ToArray(); - return [new ChartSeriesDescriptor("Nodes", points)]; + return (ChartSeriesDescriptor[])[new ChartSeriesDescriptor("Nodes", points)]; } } @@ -390,7 +390,7 @@ IReadOnlyList IChartAccessibilityData.Series $"{sourceName} to {targetName}, weight {link.Strength}"); }).ToArray(); - return [new ChartSeriesDescriptor("Edges", points)]; + return (ChartSeriesDescriptor[])[new ChartSeriesDescriptor("Edges", points)]; } } diff --git a/src/Reactor/Charting/Charts.cs b/src/Reactor/Charting/Charts.cs index 43ffc30d9..6d0a8a0ba 100644 --- a/src/Reactor/Charting/Charts.cs +++ b/src/Reactor/Charting/Charts.cs @@ -394,7 +394,7 @@ IReadOnlyList IChartAccessibilityData.Series return new ChartPointDescriptor(xLabel, yVal, label); }).ToArray(); - return [new ChartSeriesDescriptor(seriesName, points)]; + return (ChartSeriesDescriptor[])[new ChartSeriesDescriptor(seriesName, points)]; } } @@ -407,7 +407,7 @@ IReadOnlyList IChartAccessibilityData.Axes var (xMin, xMax) = D3Extent.Extent(Data, XAccessor); var (yMin, yMax) = D3Extent.Extent(Data, YAccessor); - return [ + return (ChartAxisDescriptor[])[ new ChartAxisDescriptor(ChartAxisType.X, _xAxisLabel, xMin, xMax, _xUnits), new ChartAxisDescriptor(ChartAxisType.Y, _yAxisLabel, yMin, yMax, _yUnits), ]; @@ -672,7 +672,7 @@ IReadOnlyList IChartAccessibilityData.Series }).ToArray(); var seriesName = _seriesNames?.Length > 0 ? _seriesNames[0] : "Slices"; - return [new ChartSeriesDescriptor(seriesName, points)]; + return (ChartSeriesDescriptor[])[new ChartSeriesDescriptor(seriesName, points)]; } } diff --git a/src/Reactor/Hosting/ReactorHostControl.cs b/src/Reactor/Hosting/ReactorHostControl.cs index 44fa1875e..55c3efcb5 100644 --- a/src/Reactor/Hosting/ReactorHostControl.cs +++ b/src/Reactor/Hosting/ReactorHostControl.cs @@ -357,7 +357,7 @@ private void Render() // additional reset steps, throttling) only need editing here. void RecoverFromHookOrder(HookOrderException ex, RenderContext ctx, string mode) { - _logger.LogWarning(ex, + _logger?.LogWarning(ex, "Hot reload: hook order/type changed — resetting {Mode} state and re-rendering", mode); ctx.ResetForHotReload(); diff --git a/tests/Reactor.AppTests.Host/Reactor.AppTests.Host.csproj b/tests/Reactor.AppTests.Host/Reactor.AppTests.Host.csproj index fa1776429..3831405e4 100644 --- a/tests/Reactor.AppTests.Host/Reactor.AppTests.Host.csproj +++ b/tests/Reactor.AppTests.Host/Reactor.AppTests.Host.csproj @@ -10,6 +10,14 @@ enable true None + + $(NoWarn);CsWinRT1032;CsWinRT1033 diff --git a/tests/Reactor.Tests/Reactor.Tests.csproj b/tests/Reactor.Tests/Reactor.Tests.csproj index 4389c1266..5b6a88377 100644 --- a/tests/Reactor.Tests/Reactor.Tests.csproj +++ b/tests/Reactor.Tests/Reactor.Tests.csproj @@ -11,6 +11,12 @@ false true Library + + $(NoWarn);CsWinRT1032;CsWinRT1033