Skip to content

Commit

Permalink
build(deps): bump Microsoft.WindowsAppSDK from 1.3.230331000 to 1.3.2…
Browse files Browse the repository at this point in the history
…30502000 in /src (#3543)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris Pulman <chris.pulman@yahoo.com>
  • Loading branch information
dependabot[bot] and ChrisPulman committed Jun 4, 2023
1 parent 8fe2754 commit 578ae2f
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 109 deletions.
4 changes: 3 additions & 1 deletion src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Authors>.NET Foundation and Contributors</Authors>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://reactiveui.net</PackageProjectUrl>
<DefaultPackageDescription>A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, Xamarin Forms, Xamarin.TVOS, Tizen, WPF, Windows Forms, Universal Windows Platform (UWP) and the Uno Platform.</DefaultPackageDescription>
Expand Down Expand Up @@ -52,7 +53,7 @@
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0" />
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0" PrivateAssets="All" />
<PackageReference Include="Verify.Xunit" Version="20.3.0" />
<PackageReference Include="Verify.Xunit" Version="20.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' != 'true'">
Expand All @@ -66,6 +67,7 @@
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\images\logo.png" Pack="true" PackagePath="\"/>
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" />
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.9.0.2" />
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.0.4" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.17" />
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.10.1.1" />
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.0.6" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.19" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.7.0.2" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.5.1.2" />
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.6.1.2" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<Reference Include="System.Runtime.Serialization" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net7')) ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Maui/ReactiveUI.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-windows10')) or $(TargetFramework.StartsWith('net7.0-windows10'))">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230502000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
</ItemGroup>
<ItemGroup>
Expand Down
200 changes: 100 additions & 100 deletions src/ReactiveUI.Tests/Resolvers/PocoObservableForPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ namespace ReactiveUI.Tests
{
public class PocoObservableForPropertyTests
{
private static TestLogger? _testLoggerForNotificationPocoErrorOnBind;
#pragma warning disable CA1812 // Class is not instantiated

////private static TestLogger? _testLoggerForNotificationPocoErrorOnBind;

[Fact]
public void CheckGetAffinityForObjectValues()
Expand All @@ -28,81 +30,81 @@ public void CheckGetAffinityForObjectValues()
Assert.Equal(1, instance.GetAffinityForObject(typeof(INPCClass), null!, false));
}

[Fact(Skip = "Test Scheduler is null on occasions")]
public void NotificationPocoErrorOnBind()
{
RxApp.EnsureInitialized();
////[Fact(Skip = "Test Scheduler is null on occasions")]
////public void NotificationPocoErrorOnBind()
////{
//// RxApp.EnsureInitialized();

// Use same logger, when the test is executed multiple times in the same AndroidRunner/AppDomain/AssemblyLoadContext
if (_testLoggerForNotificationPocoErrorOnBind is null)
{
_testLoggerForNotificationPocoErrorOnBind = new TestLogger();
}
////// Use same logger, when the test is executed multiple times in the same AndroidRunner/AppDomain/AssemblyLoadContext
////if (_testLoggerForNotificationPocoErrorOnBind is null)
////{
//// _testLoggerForNotificationPocoErrorOnBind = new TestLogger();
////}

// Run test twice and verify that POCO message is logged only once.
for (var i = 0; i < 2; i++)
{
using (var testLoggerRegistration = new TestLoggerRegistration(_testLoggerForNotificationPocoErrorOnBind))
{
var instance = new POCOObservableForProperty();
////// Run test twice and verify that POCO message is logged only once.
////for (var i = 0; i < 2; i++)
////{
//// using (var testLoggerRegistration = new TestLoggerRegistration(_testLoggerForNotificationPocoErrorOnBind))
//// {
//// var instance = new POCOObservableForProperty();

var testLogger = testLoggerRegistration.Logger;
//// var testLogger = testLoggerRegistration.Logger;

var testClass = new PocoType();
//// var testClass = new PocoType();

Expression<Func<PocoType, string>> expr = x => x.Property1!;
var exp = Reflection.Rewrite(expr.Body);
//// Expression<Func<PocoType, string>> expr = x => x.Property1!;
//// var exp = Reflection.Rewrite(expr.Body);

var propertyName = exp.GetMemberInfo()?.Name;
//// var propertyName = exp.GetMemberInfo()?.Name;

if (propertyName is null)
{
throw new InvalidOperationException("propertyName should not be null");
}
//// if (propertyName is null)
//// {
//// throw new InvalidOperationException("propertyName should not be null");
//// }

instance.GetNotificationForProperty(testClass, exp, propertyName, false).Subscribe(_ => { });
//// instance.GetNotificationForProperty(testClass, exp, propertyName, false).Subscribe(_ => { });

Assert.True(testLogger.LastMessages.Count > 0);
//// Assert.True(testLogger.LastMessages.Count > 0);

var expectedMessage = $"{nameof(POCOObservableForProperty)}: The class {typeof(PocoType).FullName} property {nameof(PocoType.Property1)} is a POCO type and won't send change notifications, WhenAny will only return a single value!";
Assert.Equal(expectedMessage, testLogger.LastMessages[0]);
//// var expectedMessage = $"{nameof(POCOObservableForProperty)}: The class {typeof(PocoType).FullName} property {nameof(PocoType.Property1)} is a POCO type and won't send change notifications, WhenAny will only return a single value!";
//// Assert.Equal(expectedMessage, testLogger.LastMessages[0]);

// Verify that the message is logged only once
foreach (var logMessage in testLogger.LastMessages.Skip(1))
{
Assert.NotEqual(expectedMessage, logMessage);
}
}
}
}
//// // Verify that the message is logged only once
//// foreach (var logMessage in testLogger.LastMessages.Skip(1))
//// {
//// Assert.NotEqual(expectedMessage, logMessage);
//// }
//// }
////}
////}

[Fact(Skip = "Test Scheduler is null on occasions")]
public void NotificationPocoSuppressErrorOnBind()
{
RxApp.EnsureInitialized();
using (var testLoggerRegistration = new TestLoggerRegistration())
{
var instance = new POCOObservableForProperty();
////[Fact(Skip = "Test Scheduler is null on occasions")]
////public void NotificationPocoSuppressErrorOnBind()
////{
//// RxApp.EnsureInitialized();
////using (var testLoggerRegistration = new TestLoggerRegistration())
////{
//// var instance = new POCOObservableForProperty();

var testLogger = testLoggerRegistration.Logger;
//// var testLogger = testLoggerRegistration.Logger;

var testClass = new PocoType();
//// var testClass = new PocoType();

Expression<Func<PocoType, string>> expr = x => x.Property1!;
var exp = Reflection.Rewrite(expr.Body);
//// Expression<Func<PocoType, string>> expr = x => x.Property1!;
//// var exp = Reflection.Rewrite(expr.Body);

var propertyName = exp.GetMemberInfo()?.Name;
//// var propertyName = exp.GetMemberInfo()?.Name;

if (propertyName is null)
{
throw new InvalidOperationException("propertyName should not be null");
}
//// if (propertyName is null)
//// {
//// throw new InvalidOperationException("propertyName should not be null");
//// }

instance.GetNotificationForProperty(testClass, exp, propertyName, false, true).Subscribe(_ => { });
//// instance.GetNotificationForProperty(testClass, exp, propertyName, false, true).Subscribe(_ => { });

testLogger.LastMessages.Should().NotContain(m => m.Contains(nameof(POCOObservableForProperty)));
}
}
//// testLogger.LastMessages.Should().NotContain(m => m.Contains(nameof(POCOObservableForProperty)));
////}
////}

private class PocoType
{
Expand All @@ -111,62 +113,60 @@ private class PocoType
public string? Property2 { get; set; }
}

#pragma warning disable CA1812 // Class is not instantiated

private class INPCClass : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;

public void NotifyPropertyChanged() => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(string.Empty));
}

#pragma warning restore CA1812 // Class is not instantiated
////private class TestLogger : ILogger
////{
//// public List<string> LastMessages { get; } = new();

private class TestLogger : ILogger
{
public List<string> LastMessages { get; } = new();
//// public LogLevel Level => LogLevel.Debug;

public LogLevel Level => LogLevel.Debug;
//// public void Write(Exception exception, string message, Type type, LogLevel logLevel) => LastMessages.Add(message);

public void Write(Exception exception, string message, Type type, LogLevel logLevel) => LastMessages.Add(message);
//// public void Write(string message, LogLevel logLevel) => LastMessages.Add(message);

public void Write(string message, LogLevel logLevel) => LastMessages.Add(message);
//// public void Write(Exception exception, string message, LogLevel logLevel) => LastMessages.Add(message);

public void Write(Exception exception, string message, LogLevel logLevel) => LastMessages.Add(message);
//// public void Write([Localizable(false)] string message, [Localizable(false)] Type type, LogLevel logLevel) => LastMessages.Add(message);
////}

public void Write([Localizable(false)] string message, [Localizable(false)] Type type, LogLevel logLevel) => LastMessages.Add(message);
}
////private sealed class TestLoggerRegistration : IDisposable
////{
//// private readonly List<ILogger> _originalLoggers;

private sealed class TestLoggerRegistration : IDisposable
{
private readonly List<ILogger> _originalLoggers;

public TestLoggerRegistration()
: this(null)
{
}

public TestLoggerRegistration(TestLogger? testLogger)
{
_originalLoggers = Locator.Current.GetServices<ILogger>().ToList();

Logger = testLogger ?? new TestLogger();
Locator.CurrentMutable.RegisterConstant<ILogger>(Logger);
}

public TestLogger Logger { get; }

public void Dispose()
{
// It's not possible to unregister specific logger,
// so all are unregistered and originals are re-registered.
Locator.CurrentMutable.UnregisterAll<ILogger>();

foreach (var logger in _originalLoggers)
{
Locator.CurrentMutable.RegisterConstant<ILogger>(logger);
}
}
}
//// public TestLoggerRegistration()
//// : this(null)
//// {
//// }

//// public TestLoggerRegistration(TestLogger? testLogger)
//// {
//// _originalLoggers = Locator.Current.GetServices<ILogger>().ToList();

//// Logger = testLogger ?? new TestLogger();
//// Locator.CurrentMutable.RegisterConstant<ILogger>(Logger);
//// }

//// public TestLogger Logger { get; }

//// public void Dispose()
//// {
//// // It's not possible to unregister specific logger,
//// // so all are unregistered and originals are re-registered.
//// Locator.CurrentMutable.UnregisterAll<ILogger>();

//// foreach (var logger in _originalLoggers)
//// {
//// Locator.CurrentMutable.RegisterConstant<ILogger>(logger);
//// }
//// }
////}

#pragma warning restore CA1812 // Class is not instantiated
}
}
2 changes: 1 addition & 1 deletion src/ReactiveUI.WinUI/ReactiveUI.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230502000" />
</ItemGroup>

<!-- Workaround for https://github.com/microsoft/WindowsAppSDK/issues/1217
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "19.1",
"version": "19.2",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
"^refs/heads/main$",
Expand Down

0 comments on commit 578ae2f

Please sign in to comment.