Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: remove deprecated targets #3584

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<LangVersion>preview</LangVersion>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<WarningsAsErrors>CS8600;CS8602;CS8603;CS8604;CS8605;CS8606;CS8607;CS8608;CS8609;CS8610;CS8611;CS8612;CS8613;CS8614;CS8615;CS8616;CS8617;CS8618;CS8619;CS8620;CS8621;CS8622;CS8623;CS8624;CS8625;CS8626;CS8627;CS8628;CS8629;CS8630;CS8634;CS8766;CS8767</WarningsAsErrors>
<WarningsAsErrors>nullable</WarningsAsErrors>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down Expand Up @@ -72,7 +72,6 @@

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />

<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.3.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Blend/ReactiveUI.Blend.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0</TargetFrameworks>
<AssemblyName>ReactiveUI.Blend</AssemblyName>
<RootNamespace>ReactiveUI.Blend</RootNamespace>
<PackageDescription>Provides reactive extensions based xaml components based on the Blend SDK library, allowing you to fire a observable from XAML</PackageDescription>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Drawing/ReactiveUI.Drawing.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;net6.0-maccatalyst;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0</TargetFrameworks>
<AssemblyName>ReactiveUI.Drawing</AssemblyName>
<RootNamespace>ReactiveUI.Drawing</RootNamespace>
Expand Down
721 changes: 0 additions & 721 deletions src/ReactiveUI.Mac.sln

This file was deleted.

1,018 changes: 1,018 additions & 0 deletions src/ReactiveUI.Tests/API/ApiApprovalTests.ReactiveUI.DotNet7_0.verified.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName=".NET 7.0")]
namespace ReactiveUI.Testing
{
public interface IBuilder { }
public static class IBuilderExtensions
{
public static TBuilder With<TBuilder, TField>(this TBuilder builder, ref System.Collections.Generic.List<TField>? field, System.Collections.Generic.IEnumerable<TField> values)
where TBuilder : ReactiveUI.Testing.IBuilder { }
public static TBuilder With<TBuilder, TField>(this TBuilder builder, ref System.Collections.Generic.List<TField>? field, TField value)
where TBuilder : ReactiveUI.Testing.IBuilder { }
public static TBuilder With<TBuilder, TField>(this TBuilder builder, out TField field, TField value)
where TBuilder : ReactiveUI.Testing.IBuilder { }
public static TBuilder With<TBuilder, TKey, TField>(this TBuilder builder, ref System.Collections.Generic.Dictionary<TKey, TField> dictionary, System.Collections.Generic.IDictionary<TKey, TField> keyValuePair)
where TKey : notnull { }
public static TBuilder With<TBuilder, TKey, TField>(this TBuilder builder, ref System.Collections.Generic.Dictionary<TKey, TField> dictionary, System.Collections.Generic.KeyValuePair<TKey, TField> keyValuePair)
where TBuilder : ReactiveUI.Testing.IBuilder
where TKey : notnull { }
public static TBuilder With<TBuilder, TKey, TField>(this TBuilder builder, ref System.Collections.Generic.Dictionary<TKey, TField> dictionary, TKey key, TField value)
where TBuilder : ReactiveUI.Testing.IBuilder
where TKey : notnull { }
}
public static class MessageBusExtensions
{
public static void With(this ReactiveUI.IMessageBus messageBus, System.Action block) { }
public static TRet With<TRet>(this ReactiveUI.IMessageBus messageBus, System.Func<TRet> block) { }
public static System.IDisposable WithMessageBus(this ReactiveUI.IMessageBus messageBus) { }
}
public static class SchedulerExtensions
{
public static void AdvanceByMs(this Microsoft.Reactive.Testing.TestScheduler scheduler, double milliseconds) { }
public static void AdvanceToMs(this Microsoft.Reactive.Testing.TestScheduler scheduler, double milliseconds) { }
public static long FromTimeSpan(this Microsoft.Reactive.Testing.TestScheduler scheduler, System.TimeSpan span) { }
public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnCompletedAt<T>(this Microsoft.Reactive.Testing.TestScheduler scheduler, double milliseconds) { }
public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnErrorAt<T>(this Microsoft.Reactive.Testing.TestScheduler scheduler, double milliseconds, System.Exception ex) { }
public static Microsoft.Reactive.Testing.Recorded<System.Reactive.Notification<T>> OnNextAt<T>(this Microsoft.Reactive.Testing.TestScheduler scheduler, double milliseconds, T value) { }
public static void With<T>(this T scheduler, System.Action<T> block)
where T : System.Reactive.Concurrency.IScheduler { }
public static TRet With<T, TRet>(this T scheduler, System.Func<T, TRet> block)
where T : System.Reactive.Concurrency.IScheduler { }
public static System.Threading.Tasks.Task WithAsync<T>(this T scheduler, System.Func<T, System.Threading.Tasks.Task> block)
where T : System.Reactive.Concurrency.IScheduler { }
public static System.Threading.Tasks.Task<TRet> WithAsync<T, TRet>(this T scheduler, System.Func<T, System.Threading.Tasks.Task<TRet>> block)
where T : System.Reactive.Concurrency.IScheduler { }
public static System.IDisposable WithScheduler(System.Reactive.Concurrency.IScheduler scheduler) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows10.0.17763.0")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName=".NET 7.0")]
[assembly: System.Runtime.Versioning.TargetPlatform("Windows10.0.17763.0")]
namespace ReactiveUI.Winforms
{
public class ActivationForViewFetcher : ReactiveUI.IActivationForViewFetcher, Splat.IEnableLogger
{
public ActivationForViewFetcher() { }
public System.IObservable<bool> GetActivationForView(ReactiveUI.IActivatableView view) { }
public int GetAffinityForView(System.Type view) { }
}
public class ContentControlBindingHook : ReactiveUI.IPropertyBindingHook
{
public ContentControlBindingHook() { }
public bool ExecuteHook(object? source, object target, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewModelProperties, System.Func<ReactiveUI.IObservedChange<object, object>[]> getCurrentViewProperties, ReactiveUI.BindingDirection direction) { }
}
public class CreatesWinformsCommandBinding : ReactiveUI.ICreatesCommandBinding
{
public CreatesWinformsCommandBinding() { }
public System.IDisposable? BindCommandToObject(System.Windows.Input.ICommand? command, object? target, System.IObservable<object?> commandParameter) { }
public System.IDisposable? BindCommandToObject<TEventArgs>(System.Windows.Input.ICommand? command, object? target, System.IObservable<object?> commandParameter, string eventName) { }
public int GetAffinityForObject(System.Type type, bool hasEventTarget) { }
}
public class PanelSetMethodBindingConverter : ReactiveUI.ISetMethodBindingConverter, Splat.IEnableLogger
{
public PanelSetMethodBindingConverter() { }
public int GetAffinityForObjects(System.Type? fromType, System.Type? toType) { }
public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { }
}
public class PlatformOperations : ReactiveUI.IPlatformOperations
{
public PlatformOperations() { }
public string? GetOrientation() { }
}
public class ReactiveUserControl<TViewModel> : System.Windows.Forms.UserControl, ReactiveUI.IActivatableView, ReactiveUI.IViewFor, ReactiveUI.IViewFor<TViewModel>
where TViewModel : class
{
public ReactiveUserControl() { }
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The ViewModel.")]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public TViewModel ViewModel { get; set; }
protected override void Dispose(bool disposing) { }
}
public class Registrations
{
public Registrations() { }
public void Register(System.Action<System.Func<object>, System.Type> registerFunction) { }
}
[System.ComponentModel.DefaultProperty("ViewModel")]
public class RoutedControlHost : System.Windows.Forms.UserControl, ReactiveUI.IReactiveObject, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging
{
public RoutedControlHost() { }
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The default control when no viewmodel is specified")]
public System.Windows.Forms.Control? DefaultContent { get; set; }
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The router.")]
public ReactiveUI.RoutingState? Router { get; set; }
[System.ComponentModel.Browsable(false)]
public System.IObservable<string>? ViewContractObservable { get; set; }
[System.ComponentModel.Browsable(false)]
public ReactiveUI.IViewLocator? ViewLocator { get; set; }
public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged;
public event System.ComponentModel.PropertyChangingEventHandler? PropertyChanging;
protected override void Dispose(bool disposing) { }
}
public class TableContentSetMethodBindingConverter : ReactiveUI.ISetMethodBindingConverter, Splat.IEnableLogger
{
public TableContentSetMethodBindingConverter() { }
public int GetAffinityForObjects(System.Type? fromType, System.Type? toType) { }
public object PerformSet(object? toTarget, object? newValue, object?[]? arguments) { }
}
[System.ComponentModel.DefaultProperty("ViewModel")]
public class ViewModelControlHost : System.Windows.Forms.UserControl, ReactiveUI.IActivatableView, ReactiveUI.IReactiveObject, ReactiveUI.IViewFor, Splat.IEnableLogger, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging
{
public ViewModelControlHost() { }
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.DefaultValue(true)]
[System.ComponentModel.Description("Cache Views")]
public bool CacheViews { get; set; }
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The Current View")]
public object? Content { get; set; }
public System.Windows.Forms.Control? CurrentView { get; }
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The default control when no viewmodel is specified")]
public System.Windows.Forms.Control? DefaultContent { get; set; }
[System.ComponentModel.Browsable(false)]
public System.IObservable<string>? ViewContractObservable { get; set; }
[System.ComponentModel.Browsable(false)]
public ReactiveUI.IViewLocator? ViewLocator { get; set; }
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Category("ReactiveUI")]
[System.ComponentModel.Description("The viewmodel to host.")]
public object? ViewModel { get; set; }
public static bool DefaultCacheViewsEnabled { get; set; }
public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged;
public event System.ComponentModel.PropertyChangingEventHandler? PropertyChanging;
protected override void Dispose(bool disposing) { }
}
public class WinformsCreatesObservableForProperty : ReactiveUI.ICreatesObservableForProperty, Splat.IEnableLogger
{
public WinformsCreatesObservableForProperty() { }
public int GetAffinityForObject(System.Type type, string propertyName, bool beforeChanged = false) { }
public System.IObservable<ReactiveUI.IObservedChange<object, object?>> GetNotificationForProperty(object sender, System.Linq.Expressions.Expression expression, string propertyName, bool beforeChanged = false, bool suppressWarnings = false) { }
}
}
21 changes: 18 additions & 3 deletions src/ReactiveUI.Tests/ReactiveUI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net472;net6.0-windows10.0.17763.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>

Expand Down Expand Up @@ -36,7 +36,22 @@
<Compile Remove="Platforms\windows-xaml\Api\XamlApiApprovalTests.cs" />
</ItemGroup>
</When>
<When Condition=" $(TargetFramework.StartsWith('net4'))">
<When Condition=" $(TargetFramework.StartsWith('net7.0-windows')) ">
<PropertyGroup>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ReactiveUI.Winforms\ReactiveUI.Winforms.csproj" />
<ProjectReference Include="..\ReactiveUI.Wpf\ReactiveUI.Wpf.csproj" />
<Compile Include="Platforms\common-gui\**\*.cs" />
<Compile Include="Platforms\wpf\**\*.cs" />
<Compile Include="Platforms\Winforms\**\*.cs" />
<Compile Include="Platforms\windows-xaml\**\*.cs" />
<Compile Remove="Platforms\windows-xaml\Api\XamlApiApprovalTests.cs" />
</ItemGroup>
</When>
<When Condition=" $(TargetFramework.StartsWith('net47'))">
<PropertyGroup>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI/ReactiveUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;tizen40;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;net6.0-maccatalyst;net7.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;tizen40;net6.0;net7.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.19041.0;net7.0-windows10.0.19041.0</TargetFrameworks>
<AssemblyName>ReactiveUI</AssemblyName>
<RootNamespace>ReactiveUI</RootNamespace>
Expand Down