From 92f1fcc8c295cbab4e158083c60e7216f893f6d0 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Thu, 7 Sep 2023 10:12:03 +0200 Subject: [PATCH 1/2] Updating namespace to .Collections --- components/Collections/samples/AdvancedCollectionView.md | 4 ++-- .../Collections/samples/AdvancedCollectionViewSample.xaml | 1 - .../Collections/samples/AdvancedCollectionViewSample.xaml.cs | 2 +- .../Collections/samples/IncrementalLoadingCollection.md | 4 ++-- .../samples/IncrementalLoadingCollectionSample.xaml | 1 - .../samples/IncrementalLoadingCollectionSample.xaml.cs | 2 +- .../AdvancedCollectionView/AdvancedCollectionView.Defer.cs | 2 +- .../AdvancedCollectionView/AdvancedCollectionView.Events.cs | 2 +- .../src/AdvancedCollectionView/AdvancedCollectionView.cs | 2 +- .../src/AdvancedCollectionView/IAdvancedCollectionView.cs | 2 +- .../Collections/src/AdvancedCollectionView/SortDescription.cs | 2 +- .../Collections/src/AdvancedCollectionView/SortDirection.cs | 2 +- .../src/AdvancedCollectionView/VectorChangedEventArgs.cs | 2 +- .../src/IncrementalLoadingCollection/IIncrementalSource.cs | 2 +- .../IncrementalLoadingCollection.cs | 2 +- components/Collections/tests/DataSource.cs | 2 +- components/Collections/tests/Test_AdvancedCollectionView.cs | 1 + .../Collections/tests/Test_IncrementalLoadingCollection.cs | 1 + 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/components/Collections/samples/AdvancedCollectionView.md b/components/Collections/samples/AdvancedCollectionView.md index a111ed37..c2c37bd1 100644 --- a/components/Collections/samples/AdvancedCollectionView.md +++ b/components/Collections/samples/AdvancedCollectionView.md @@ -2,7 +2,7 @@ title: AdvancedCollectionView author: nmetulev description: The AdvancedCollectionView is a collection view implementation that support filtering, sorting and incremental loading. It's meant to be used in a viewmodel. -keywords: AdvancedCollectionView, data, sorting, filtering +keywords: AdvancedCollectionView, data, sorting, filtering, Collections dev_langs: - csharp category: Helpers @@ -27,7 +27,7 @@ In your viewmodel instead of having a public [IEnumerable](https://learn.microso ## Example ```csharp -using CommunityToolkit.WinUI; +using CommunityToolkit.WinUI.Collections; // Grab a sample type public class Person diff --git a/components/Collections/samples/AdvancedCollectionViewSample.xaml b/components/Collections/samples/AdvancedCollectionViewSample.xaml index 52800777..80801029 100644 --- a/components/Collections/samples/AdvancedCollectionViewSample.xaml +++ b/components/Collections/samples/AdvancedCollectionViewSample.xaml @@ -2,7 +2,6 @@ /// A collection view implementation that supports filtering, grouping, sorting and incremental loading diff --git a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Events.cs b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Events.cs index e6c36111..87f35529 100644 --- a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Events.cs +++ b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.Events.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// A collection view implementation that supports filtering, grouping, sorting and incremental loading diff --git a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs index 61287617..281b25ce 100644 --- a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs +++ b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs @@ -8,7 +8,7 @@ using System.Runtime.CompilerServices; using NotifyCollectionChangedAction = global::System.Collections.Specialized.NotifyCollectionChangedAction; -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// A collection view implementation that supports filtering, sorting and incremental loading diff --git a/components/Collections/src/AdvancedCollectionView/IAdvancedCollectionView.cs b/components/Collections/src/AdvancedCollectionView/IAdvancedCollectionView.cs index 35050b27..1b42069a 100644 --- a/components/Collections/src/AdvancedCollectionView/IAdvancedCollectionView.cs +++ b/components/Collections/src/AdvancedCollectionView/IAdvancedCollectionView.cs @@ -4,7 +4,7 @@ using System.Collections; -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// Extended ICollectionView with filtering and sorting diff --git a/components/Collections/src/AdvancedCollectionView/SortDescription.cs b/components/Collections/src/AdvancedCollectionView/SortDescription.cs index dc1dd167..abc6b83a 100644 --- a/components/Collections/src/AdvancedCollectionView/SortDescription.cs +++ b/components/Collections/src/AdvancedCollectionView/SortDescription.cs @@ -4,7 +4,7 @@ using System.Collections; -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// Sort description diff --git a/components/Collections/src/AdvancedCollectionView/SortDirection.cs b/components/Collections/src/AdvancedCollectionView/SortDirection.cs index 38a9d8f0..3ec6a450 100644 --- a/components/Collections/src/AdvancedCollectionView/SortDirection.cs +++ b/components/Collections/src/AdvancedCollectionView/SortDirection.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// Sort direction enum diff --git a/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs b/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs index 93136bd1..0e5be060 100644 --- a/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs +++ b/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// Vector changed EventArgs diff --git a/components/Collections/src/IncrementalLoadingCollection/IIncrementalSource.cs b/components/Collections/src/IncrementalLoadingCollection/IIncrementalSource.cs index 1a8ac411..dadf1aff 100644 --- a/components/Collections/src/IncrementalLoadingCollection/IIncrementalSource.cs +++ b/components/Collections/src/IncrementalLoadingCollection/IIncrementalSource.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// This interface represents a data source whose items can be loaded incrementally. diff --git a/components/Collections/src/IncrementalLoadingCollection/IncrementalLoadingCollection.cs b/components/Collections/src/IncrementalLoadingCollection/IncrementalLoadingCollection.cs index f87909b9..41cd4ab1 100644 --- a/components/Collections/src/IncrementalLoadingCollection/IncrementalLoadingCollection.cs +++ b/components/Collections/src/IncrementalLoadingCollection/IncrementalLoadingCollection.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CommunityToolkit.WinUI; +namespace CommunityToolkit.WinUI.Collections; /// /// This class represents an whose items can be loaded incrementally. diff --git a/components/Collections/tests/DataSource.cs b/components/Collections/tests/DataSource.cs index b4846e59..748a1e39 100644 --- a/components/Collections/tests/DataSource.cs +++ b/components/Collections/tests/DataSource.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. namespace CollectionsExperiment.Tests; - +using CommunityToolkit.WinUI.Collections; public class DataSource : IIncrementalSource { private readonly IEnumerable items; diff --git a/components/Collections/tests/Test_AdvancedCollectionView.cs b/components/Collections/tests/Test_AdvancedCollectionView.cs index 7d95c206..752ae374 100644 --- a/components/Collections/tests/Test_AdvancedCollectionView.cs +++ b/components/Collections/tests/Test_AdvancedCollectionView.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; +using CommunityToolkit.WinUI.Collections; namespace CollectionsExperiment.Tests; diff --git a/components/Collections/tests/Test_IncrementalLoadingCollection.cs b/components/Collections/tests/Test_IncrementalLoadingCollection.cs index 97f38ba8..32263b9c 100644 --- a/components/Collections/tests/Test_IncrementalLoadingCollection.cs +++ b/components/Collections/tests/Test_IncrementalLoadingCollection.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. namespace CollectionsExperiment.Tests; +using CommunityToolkit.WinUI.Collections; [TestClass] public class Test_IncrementalLoadingCollection From 0931d92d185119c937b1b9096c28b4e8243d7957 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Thu, 7 Sep 2023 10:20:10 +0200 Subject: [PATCH 2/2] Address feedback --- components/Collections/tests/DataSource.cs | 1 + components/Collections/tests/Test_AdvancedCollectionView.cs | 3 ++- .../Collections/tests/Test_IncrementalLoadingCollection.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/Collections/tests/DataSource.cs b/components/Collections/tests/DataSource.cs index 748a1e39..61c046f4 100644 --- a/components/Collections/tests/DataSource.cs +++ b/components/Collections/tests/DataSource.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. namespace CollectionsExperiment.Tests; + using CommunityToolkit.WinUI.Collections; public class DataSource : IIncrementalSource { diff --git a/components/Collections/tests/Test_AdvancedCollectionView.cs b/components/Collections/tests/Test_AdvancedCollectionView.cs index 752ae374..07de59de 100644 --- a/components/Collections/tests/Test_AdvancedCollectionView.cs +++ b/components/Collections/tests/Test_AdvancedCollectionView.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.CompilerServices; using CommunityToolkit.WinUI.Collections; +using System.Runtime.CompilerServices; + namespace CollectionsExperiment.Tests; [TestClass] diff --git a/components/Collections/tests/Test_IncrementalLoadingCollection.cs b/components/Collections/tests/Test_IncrementalLoadingCollection.cs index 32263b9c..99a31555 100644 --- a/components/Collections/tests/Test_IncrementalLoadingCollection.cs +++ b/components/Collections/tests/Test_IncrementalLoadingCollection.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace CollectionsExperiment.Tests; using CommunityToolkit.WinUI.Collections; +namespace CollectionsExperiment.Tests; + [TestClass] public class Test_IncrementalLoadingCollection {