From 317241bb830ae6f701910af210067f4085d1b12a Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 12 Mar 2022 00:56:02 +0100 Subject: [PATCH 1/3] Move collection types to MVVM Toolkit --- .../Collections/IReadOnlyObservableGroup.cs | 0 .../Collections/ObservableGroup.cs | 0 .../Collections/ObservableGroupedCollection.cs | 0 .../Collections/ObservableGroupedCollectionExtensions.cs | 0 .../Collections/ReadOnlyObservableGroup.cs | 0 .../Collections/ReadOnlyObservableGroupedCollection.cs | 0 .../Collections/IntGroup.cs | 0 .../Collections/ObservableGroupTests.cs | 0 .../Collections/ObservableGroupedCollectionExtensionsTests.cs | 0 .../Collections/ObservableGroupedCollectionTests.cs | 0 .../Collections/ReadOnlyObservableGroupTests.cs | 0 .../Collections/ReadOnlyObservableGroupedCollectionTests.cs | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/IReadOnlyObservableGroup.cs (100%) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/ObservableGroup.cs (100%) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/ObservableGroupedCollection.cs (100%) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/ObservableGroupedCollectionExtensions.cs (100%) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/ReadOnlyObservableGroup.cs (100%) rename {CommunityToolkit.Common => CommunityToolkit.Mvvm}/Collections/ReadOnlyObservableGroupedCollection.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/IntGroup.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/ObservableGroupTests.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/ObservableGroupedCollectionExtensionsTests.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/ObservableGroupedCollectionTests.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/ReadOnlyObservableGroupTests.cs (100%) rename tests/{CommunityToolkit.Common.UnitTests => CommunityToolkit.Mvvm.UnitTests}/Collections/ReadOnlyObservableGroupedCollectionTests.cs (100%) diff --git a/CommunityToolkit.Common/Collections/IReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs similarity index 100% rename from CommunityToolkit.Common/Collections/IReadOnlyObservableGroup.cs rename to CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs diff --git a/CommunityToolkit.Common/Collections/ObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs similarity index 100% rename from CommunityToolkit.Common/Collections/ObservableGroup.cs rename to CommunityToolkit.Mvvm/Collections/ObservableGroup.cs diff --git a/CommunityToolkit.Common/Collections/ObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs similarity index 100% rename from CommunityToolkit.Common/Collections/ObservableGroupedCollection.cs rename to CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs diff --git a/CommunityToolkit.Common/Collections/ObservableGroupedCollectionExtensions.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs similarity index 100% rename from CommunityToolkit.Common/Collections/ObservableGroupedCollectionExtensions.cs rename to CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs diff --git a/CommunityToolkit.Common/Collections/ReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs similarity index 100% rename from CommunityToolkit.Common/Collections/ReadOnlyObservableGroup.cs rename to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs diff --git a/CommunityToolkit.Common/Collections/ReadOnlyObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs similarity index 100% rename from CommunityToolkit.Common/Collections/ReadOnlyObservableGroupedCollection.cs rename to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/IntGroup.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/IntGroup.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupTests.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionTests.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/ReadOnlyObservableGroupTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/ReadOnlyObservableGroupTests.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs diff --git a/tests/CommunityToolkit.Common.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs similarity index 100% rename from tests/CommunityToolkit.Common.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs rename to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs From 69a9a69b7f2ddfdecb96cf98730dd89e0cfef6f0 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 12 Mar 2022 00:57:32 +0100 Subject: [PATCH 2/3] Change namespace to .Mvvm --- CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs | 2 +- CommunityToolkit.Mvvm/Collections/ObservableGroup.cs | 2 +- .../Collections/ObservableGroupedCollection.cs | 2 +- .../Collections/ObservableGroupedCollectionExtensions.cs | 2 +- CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs | 2 +- .../Collections/ReadOnlyObservableGroupedCollection.cs | 2 +- tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs | 2 +- .../Collections/ObservableGroupTests.cs | 4 ++-- .../Collections/ObservableGroupedCollectionExtensionsTests.cs | 4 ++-- .../Collections/ObservableGroupedCollectionTests.cs | 4 ++-- .../Collections/ReadOnlyObservableGroupTests.cs | 4 ++-- .../Collections/ReadOnlyObservableGroupedCollectionTests.cs | 4 ++-- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs index 2519c5150..9c9f8a2b4 100644 --- a/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs +++ b/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs @@ -4,7 +4,7 @@ using System.ComponentModel; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// An interface for a grouped collection of items. diff --git a/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs index 6bdd10d41..71fdf782f 100644 --- a/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs +++ b/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs @@ -8,7 +8,7 @@ using System.Diagnostics; using System.Linq; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// An observable group. diff --git a/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs index b62af5749..5c3da18b4 100644 --- a/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs +++ b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Runtime.CompilerServices; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// An observable list of observable groups. diff --git a/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs index 2eba7012e..44a2b436e 100644 --- a/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs +++ b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Runtime.CompilerServices; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// The extensions methods to simplify the usage of . diff --git a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs index 3c86efc8a..304e7e54d 100644 --- a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs +++ b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs @@ -6,7 +6,7 @@ using System.Collections.ObjectModel; using System.Linq; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// A read-only observable group. It associates a to a . diff --git a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs index 3780b12bf..f5be9a2e6 100644 --- a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs +++ b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs @@ -9,7 +9,7 @@ using System.Diagnostics; using System.Linq; -namespace CommunityToolkit.Common.Collections; +namespace CommunityToolkit.Mvvm.Collections; /// /// A read-only list of groups. diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs index 7ef0d446d..e76bee1da 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; public class IntGroup : List, IGrouping { diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs index 2ee14ba35..f25a8f1df 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs @@ -4,10 +4,10 @@ using System.Collections.Specialized; using System.Linq; -using CommunityToolkit.Common.Collections; +using CommunityToolkit.Mvvm.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] public class ObservableGroupTests diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs index f731d8473..43aa55afe 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs @@ -4,10 +4,10 @@ using System; using System.Linq; -using CommunityToolkit.Common.Collections; +using CommunityToolkit.Mvvm.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] public class ObservableGroupedCollectionExtensionsTests diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs index 1f1b015d0..9df27d94e 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs @@ -4,10 +4,10 @@ using System.Collections.Generic; using System.Linq; -using CommunityToolkit.Common.Collections; +using CommunityToolkit.Mvvm.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] public class ObservableGroupedCollectionTests diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs index e028000f3..c85c025d6 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupTests.cs @@ -6,10 +6,10 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; -using CommunityToolkit.Common.Collections; +using CommunityToolkit.Mvvm.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] public class ReadOnlyObservableGroupTests diff --git a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs index 7ec3935ca..50a261c4a 100644 --- a/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs +++ b/tests/CommunityToolkit.Mvvm.UnitTests/Collections/ReadOnlyObservableGroupedCollectionTests.cs @@ -9,10 +9,10 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Linq; -using CommunityToolkit.Common.Collections; +using CommunityToolkit.Mvvm.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace CommunityToolkit.Common.UnitTests.Collections; +namespace CommunityToolkit.Mvvm.UnitTests; [TestClass] public class ReadOnlyObservableGroupedCollectionTests From 54519726d9620e3e8c0f247b9a4381b8a8633fb8 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 12 Mar 2022 00:59:53 +0100 Subject: [PATCH 3/3] Rename files --- .../Collections/IReadOnlyObservableGroup.cs | 5 +---- ...ection.cs => ObservableGroupedCollection{TKey,TValue}.cs} | 0 .../{ObservableGroup.cs => ObservableGroup{TKey,TValue}.cs} | 0 ...s => ReadOnlyObservableGroupedCollection{TKey,TValue}.cs} | 0 ...vableGroup.cs => ReadOnlyObservableGroup{TKey,TValue}.cs} | 0 5 files changed, 1 insertion(+), 4 deletions(-) rename CommunityToolkit.Mvvm/Collections/{ObservableGroupedCollection.cs => ObservableGroupedCollection{TKey,TValue}.cs} (100%) rename CommunityToolkit.Mvvm/Collections/{ObservableGroup.cs => ObservableGroup{TKey,TValue}.cs} (100%) rename CommunityToolkit.Mvvm/Collections/{ReadOnlyObservableGroupedCollection.cs => ReadOnlyObservableGroupedCollection{TKey,TValue}.cs} (100%) rename CommunityToolkit.Mvvm/Collections/{ReadOnlyObservableGroup.cs => ReadOnlyObservableGroup{TKey,TValue}.cs} (100%) diff --git a/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs index 9c9f8a2b4..d7b9eda2b 100644 --- a/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs +++ b/CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs @@ -8,14 +8,11 @@ namespace CommunityToolkit.Mvvm.Collections; /// /// An interface for a grouped collection of items. -/// It allows us to use x:Bind with and by providing -/// a non-generic type that we can declare using x:DataType. /// public interface IReadOnlyObservableGroup : INotifyPropertyChanged { /// - /// Gets the key for the current collection, as an . - /// It is immutable. + /// Gets the key for the current collection. /// object Key { get; } diff --git a/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection{TKey,TValue}.cs similarity index 100% rename from CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection.cs rename to CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection{TKey,TValue}.cs diff --git a/CommunityToolkit.Mvvm/Collections/ObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ObservableGroup{TKey,TValue}.cs similarity index 100% rename from CommunityToolkit.Mvvm/Collections/ObservableGroup.cs rename to CommunityToolkit.Mvvm/Collections/ObservableGroup{TKey,TValue}.cs diff --git a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection{TKey,TValue}.cs similarity index 100% rename from CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection.cs rename to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection{TKey,TValue}.cs diff --git a/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs b/CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup{TKey,TValue}.cs similarity index 100% rename from CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup.cs rename to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup{TKey,TValue}.cs