From a102e1fbf3468fd7bb53f8293df12348b1ecf4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=AFs=20Betts?= Date: Sun, 28 Feb 2021 10:58:13 +0100 Subject: [PATCH 1/2] Registrable interfaces should always be Public It's super important that any interface we register in an `IWantsToRegisterStuff` is `public`, and ideally, the implementation too. This means that people can always extend ReactiveUI or support a new platform without having to fork the library --- src/ReactiveUI/Interfaces/IPlatformOperations.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReactiveUI/Interfaces/IPlatformOperations.cs b/src/ReactiveUI/Interfaces/IPlatformOperations.cs index 2b163d546f..f919a92d22 100644 --- a/src/ReactiveUI/Interfaces/IPlatformOperations.cs +++ b/src/ReactiveUI/Interfaces/IPlatformOperations.cs @@ -8,7 +8,7 @@ namespace ReactiveUI /// /// Additional details implemented by the different ReactiveUI platform projects. /// - internal interface IPlatformOperations + public interface IPlatformOperations { /// /// Gets a descriptor that describes (if applicable) the orientation From 632e9ca253ef1aff932dbd050830b297af063895 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Mon, 1 Mar 2021 10:52:08 +1100 Subject: [PATCH 2/2] update approved tests --- .../API/ApiApprovalTests.ReactiveUI.net472.approved.txt | 4 ++++ .../API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt | 4 ++++ .../ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt | 4 ++++ .../API/ApiApprovalTests.Winforms.net472.approved.txt | 2 +- .../API/ApiApprovalTests.Winforms.net5.0.approved.txt | 2 +- .../API/ApiApprovalTests.Winforms.netcoreapp3.1.approved.txt | 2 +- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt index 1102f013f3..82d18736c5 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net472.approved.txt @@ -225,6 +225,10 @@ namespace ReactiveUI TSender Sender { get; } TValue Value { get; } } + public interface IPlatformOperations + { + string? GetOrientation(); + } public interface IPropertyBinderImplementation : Splat.IEnableLogger { [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt index e1fe63ad1c..333a0d3eca 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.net5.0.approved.txt @@ -225,6 +225,10 @@ namespace ReactiveUI TSender Sender { get; } TValue Value { get; } } + public interface IPlatformOperations + { + string? GetOrientation(); + } public interface IPropertyBinderImplementation : Splat.IEnableLogger { [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt index 7eaf52bf83..35e6b5c4f1 100644 --- a/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt +++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.netcoreapp3.1.approved.txt @@ -223,6 +223,10 @@ namespace ReactiveUI TSender Sender { get; } TValue Value { get; } } + public interface IPlatformOperations + { + string? GetOrientation(); + } public interface IPropertyBinderImplementation : Splat.IEnableLogger { [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { diff --git a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net472.approved.txt b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net472.approved.txt index 2235dbedb8..45976e7fb2 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net472.approved.txt +++ b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net472.approved.txt @@ -26,7 +26,7 @@ namespace ReactiveUI.Winforms public int GetAffinityForObjects(System.Type fromType, System.Type toType) { } public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { } } - public class PlatformOperations + public class PlatformOperations : ReactiveUI.IPlatformOperations { public PlatformOperations() { } public string? GetOrientation() { } diff --git a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net5.0.approved.txt b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net5.0.approved.txt index 862d16f46c..3b7a5874ca 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net5.0.approved.txt +++ b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.net5.0.approved.txt @@ -28,7 +28,7 @@ namespace ReactiveUI.Winforms public int GetAffinityForObjects(System.Type fromType, System.Type toType) { } public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { } } - public class PlatformOperations + public class PlatformOperations : ReactiveUI.IPlatformOperations { public PlatformOperations() { } public string? GetOrientation() { } diff --git a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.netcoreapp3.1.approved.txt b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.netcoreapp3.1.approved.txt index e14b7d9b6b..db75d8a4e5 100644 --- a/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.netcoreapp3.1.approved.txt +++ b/src/ReactiveUI.Tests/Platforms/winforms/API/ApiApprovalTests.Winforms.netcoreapp3.1.approved.txt @@ -26,7 +26,7 @@ namespace ReactiveUI.Winforms public int GetAffinityForObjects(System.Type fromType, System.Type toType) { } public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { } } - public class PlatformOperations + public class PlatformOperations : ReactiveUI.IPlatformOperations { public PlatformOperations() { } public string? GetOrientation() { }