diff --git a/src/ReactiveUI.AOTTests/AOTCompatibilityTests.cs b/src/ReactiveUI.AOTTests/AOTCompatibilityTests.cs index 48b6c0f8ad..aafd83ec7b 100644 --- a/src/ReactiveUI.AOTTests/AOTCompatibilityTests.cs +++ b/src/ReactiveUI.AOTTests/AOTCompatibilityTests.cs @@ -3,9 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; -using System.Reactive.Linq; - namespace ReactiveUI.AOTTests; /// diff --git a/src/ReactiveUI.AOTTests/AdvancedAOTTests.cs b/src/ReactiveUI.AOTTests/AdvancedAOTTests.cs index 92ee4cac4c..e2fd8f9fed 100644 --- a/src/ReactiveUI.AOTTests/AdvancedAOTTests.cs +++ b/src/ReactiveUI.AOTTests/AdvancedAOTTests.cs @@ -3,11 +3,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; using System.Reactive.Disposables; -using System.Reactive.Linq; using System.Reactive.Subjects; -using Splat; namespace ReactiveUI.AOTTests; diff --git a/src/ReactiveUI.AOTTests/AssemblyInfo.Parallel.cs b/src/ReactiveUI.AOTTests/AssemblyInfo.Parallel.cs index 9516e8d004..eb6214b15b 100644 --- a/src/ReactiveUI.AOTTests/AssemblyInfo.Parallel.cs +++ b/src/ReactiveUI.AOTTests/AssemblyInfo.Parallel.cs @@ -3,7 +3,5 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using NUnit.Framework; - [assembly: Parallelizable(ParallelScope.Fixtures)] [assembly: LevelOfParallelism(4)] \ No newline at end of file diff --git a/src/ReactiveUI.AOTTests/ComprehensiveAOTMarkupTests.cs b/src/ReactiveUI.AOTTests/ComprehensiveAOTMarkupTests.cs index 9e2fba707c..865c96c06c 100644 --- a/src/ReactiveUI.AOTTests/ComprehensiveAOTMarkupTests.cs +++ b/src/ReactiveUI.AOTTests/ComprehensiveAOTMarkupTests.cs @@ -3,12 +3,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; using System.Reactive.Concurrency; using System.Reactive.Disposables; -using System.Reactive.Linq; using System.Reactive.Subjects; -using Splat; namespace ReactiveUI.AOTTests; diff --git a/src/ReactiveUI.AOTTests/ComprehensiveAOTTests.cs b/src/ReactiveUI.AOTTests/ComprehensiveAOTTests.cs index dcbf1cd87a..4f9b5d5fc6 100644 --- a/src/ReactiveUI.AOTTests/ComprehensiveAOTTests.cs +++ b/src/ReactiveUI.AOTTests/ComprehensiveAOTTests.cs @@ -3,12 +3,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; using System.Reactive.Concurrency; using System.Reactive.Disposables; -using System.Reactive.Linq; using System.Reactive.Subjects; -using Splat; namespace ReactiveUI.AOTTests; diff --git a/src/ReactiveUI.AOTTests/FinalAOTValidationTests.cs b/src/ReactiveUI.AOTTests/FinalAOTValidationTests.cs index 75edb583c1..97807fe9c6 100644 --- a/src/ReactiveUI.AOTTests/FinalAOTValidationTests.cs +++ b/src/ReactiveUI.AOTTests/FinalAOTValidationTests.cs @@ -3,13 +3,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; using System.Reactive; using System.Reactive.Concurrency; using System.Reactive.Disposables; -using System.Reactive.Linq; using System.Reactive.Subjects; -using Splat; namespace ReactiveUI.AOTTests; diff --git a/src/ReactiveUI.AOTTests/GlobalUsings.cs b/src/ReactiveUI.AOTTests/GlobalUsings.cs index 716d007c1a..f235253daf 100644 --- a/src/ReactiveUI.AOTTests/GlobalUsings.cs +++ b/src/ReactiveUI.AOTTests/GlobalUsings.cs @@ -9,6 +9,6 @@ global using global::System.Collections.Generic; global using global::System.Diagnostics.CodeAnalysis; global using global::System.Linq; +global using global::System.Reactive.Disposables.Fluent; global using global::System.Reactive.Linq; -global using global::System.Threading; -global using global::System.Threading.Tasks; \ No newline at end of file +global using global::System.Threading.Tasks; diff --git a/src/ReactiveUI.AOTTests/StringBasedObservationTests.cs b/src/ReactiveUI.AOTTests/StringBasedObservationTests.cs index 606ba422af..0e39952558 100644 --- a/src/ReactiveUI.AOTTests/StringBasedObservationTests.cs +++ b/src/ReactiveUI.AOTTests/StringBasedObservationTests.cs @@ -3,10 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; -using System.Reactive.Concurrency; -using System.Reactive.Linq; - namespace ReactiveUI.AOTTests; /// diff --git a/src/ReactiveUI.AOTTests/StringBasedSemanticsTests.cs b/src/ReactiveUI.AOTTests/StringBasedSemanticsTests.cs index 476e6e1baf..eb77afeb83 100644 --- a/src/ReactiveUI.AOTTests/StringBasedSemanticsTests.cs +++ b/src/ReactiveUI.AOTTests/StringBasedSemanticsTests.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Reactive.Linq; - namespace ReactiveUI.AOTTests; /// diff --git a/src/ReactiveUI.AOTTests/TestReactiveObject.cs b/src/ReactiveUI.AOTTests/TestReactiveObject.cs index b85155b479..50247cbe92 100644 --- a/src/ReactiveUI.AOTTests/TestReactiveObject.cs +++ b/src/ReactiveUI.AOTTests/TestReactiveObject.cs @@ -3,9 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Diagnostics.CodeAnalysis; -using System.Reactive.Linq; - namespace ReactiveUI.AOTTests; /// diff --git a/src/ReactiveUI.AOTTests/ViewLocatorAOTMappingTests.cs b/src/ReactiveUI.AOTTests/ViewLocatorAOTMappingTests.cs index 174b1b5e92..6e4f3ff665 100644 --- a/src/ReactiveUI.AOTTests/ViewLocatorAOTMappingTests.cs +++ b/src/ReactiveUI.AOTTests/ViewLocatorAOTMappingTests.cs @@ -3,8 +3,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for full license information. -using System.Reactive.Linq; - namespace ReactiveUI.AOTTests; /// diff --git a/src/ReactiveUI.Blazor/GlobalUsings.cs b/src/ReactiveUI.Blazor/GlobalUsings.cs index c0e66f02bd..60b0425a4d 100644 --- a/src/ReactiveUI.Blazor/GlobalUsings.cs +++ b/src/ReactiveUI.Blazor/GlobalUsings.cs @@ -11,5 +11,6 @@ global using global::System.Reactive; global using global::System.Reactive.Concurrency; global using global::System.Reactive.Disposables; +global using global::System.Reactive.Disposables.Fluent; global using global::System.Reactive.Linq; global using global::System.Reactive.Subjects; diff --git a/src/ReactiveUI.Builder.WpfApp/Views/ChatRoomView.xaml.cs b/src/ReactiveUI.Builder.WpfApp/Views/ChatRoomView.xaml.cs index dd4b42d551..21d2f5e977 100644 --- a/src/ReactiveUI.Builder.WpfApp/Views/ChatRoomView.xaml.cs +++ b/src/ReactiveUI.Builder.WpfApp/Views/ChatRoomView.xaml.cs @@ -4,6 +4,7 @@ // See the LICENSE file in the project root for full license information. using System.Reactive.Disposables; +using System.Reactive.Disposables.Fluent; using System.Windows; using ReactiveUI.Builder.WpfApp.ViewModels; diff --git a/src/ReactiveUI.Builder.WpfApp/Views/LobbyView.xaml.cs b/src/ReactiveUI.Builder.WpfApp/Views/LobbyView.xaml.cs index c1af1208fe..a899070a3d 100644 --- a/src/ReactiveUI.Builder.WpfApp/Views/LobbyView.xaml.cs +++ b/src/ReactiveUI.Builder.WpfApp/Views/LobbyView.xaml.cs @@ -4,6 +4,7 @@ // See the LICENSE file in the project root for full license information. using System.Reactive.Disposables; +using System.Reactive.Disposables.Fluent; using System.Reactive.Linq; using System.Windows; using System.Windows.Input; diff --git a/src/ReactiveUI.Maui/GlobalUsings.cs b/src/ReactiveUI.Maui/GlobalUsings.cs index df413c9efa..502eb74165 100644 --- a/src/ReactiveUI.Maui/GlobalUsings.cs +++ b/src/ReactiveUI.Maui/GlobalUsings.cs @@ -10,6 +10,7 @@ global using System.Reactive; global using System.Reactive.Concurrency; global using System.Reactive.Disposables; +global using System.Reactive.Disposables.Fluent; global using System.Reactive.Linq; global using System.Reactive.Subjects; global using System.Threading.Tasks; diff --git a/src/ReactiveUI/GlobalUsings.cs b/src/ReactiveUI/GlobalUsings.cs index 910b59068c..ba0e64eb93 100644 --- a/src/ReactiveUI/GlobalUsings.cs +++ b/src/ReactiveUI/GlobalUsings.cs @@ -17,6 +17,7 @@ global using global::System.Reactive; global using global::System.Reactive.Concurrency; global using global::System.Reactive.Disposables; +global using global::System.Reactive.Disposables.Fluent; global using global::System.Reactive.Linq; global using global::System.Reactive.Subjects; global using global::System.Reactive.Threading.Tasks; diff --git a/src/ReactiveUI/Mixins/DisposableMixins.cs b/src/ReactiveUI/Mixins/DisposableMixins.cs deleted file mode 100644 index fe61cac7b3..0000000000 --- a/src/ReactiveUI/Mixins/DisposableMixins.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2025 .NET Foundation and Contributors. All rights reserved. -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for full license information. - -namespace System.Reactive.Disposables; - -/// -/// Extension methods associated with the IDisposable interface. -/// -public static class DisposableMixins -{ - /// - /// Ensures the provided disposable is disposed with the specified . - /// - /// - /// The type of the disposable. - /// - /// - /// The disposable we are going to want to be disposed by the CompositeDisposable. - /// - /// - /// The to which will be added. - /// - /// - /// The disposable. - /// - public static T DisposeWith(this T item, CompositeDisposable compositeDisposable) - where T : IDisposable - { - compositeDisposable.ArgumentNullExceptionThrowIfNull(nameof(compositeDisposable)); - - compositeDisposable.Add(item); - return item; - } -}