Skip to content

Commit 460ebc9

Browse files
authored
Merge pull request #151 from CommunityToolkit/dev/collections-to-mvvm-toolkit
Move collection types to MVVM Toolkit
2 parents 4b9a610 + 5451972 commit 460ebc9

12 files changed

+18
-21
lines changed

CommunityToolkit.Common/Collections/IReadOnlyObservableGroup.cs renamed to CommunityToolkit.Mvvm/Collections/IReadOnlyObservableGroup.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44

55
using System.ComponentModel;
66

7-
namespace CommunityToolkit.Common.Collections;
7+
namespace CommunityToolkit.Mvvm.Collections;
88

99
/// <summary>
1010
/// An interface for a grouped collection of items.
11-
/// It allows us to use x:Bind with <see cref="ObservableGroup{TKey, TValue}"/> and <see cref="ReadOnlyObservableGroup{TKey, TValue}"/> by providing
12-
/// a non-generic type that we can declare using x:DataType.
1311
/// </summary>
1412
public interface IReadOnlyObservableGroup : INotifyPropertyChanged
1513
{
1614
/// <summary>
17-
/// Gets the key for the current collection, as an <see cref="object"/>.
18-
/// It is immutable.
15+
/// Gets the key for the current collection.
1916
/// </summary>
2017
object Key { get; }
2118

CommunityToolkit.Common/Collections/ObservableGroupedCollectionExtensions.cs renamed to CommunityToolkit.Mvvm/Collections/ObservableGroupedCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Linq;
88
using System.Runtime.CompilerServices;
99

10-
namespace CommunityToolkit.Common.Collections;
10+
namespace CommunityToolkit.Mvvm.Collections;
1111

1212
/// <summary>
1313
/// The extensions methods to simplify the usage of <see cref="ObservableGroupedCollection{TKey, TValue}"/>.

CommunityToolkit.Common/Collections/ObservableGroupedCollection.cs renamed to CommunityToolkit.Mvvm/Collections/ObservableGroupedCollection{TKey,TValue}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Linq;
99
using System.Runtime.CompilerServices;
1010

11-
namespace CommunityToolkit.Common.Collections;
11+
namespace CommunityToolkit.Mvvm.Collections;
1212

1313
/// <summary>
1414
/// An observable list of observable groups.

CommunityToolkit.Common/Collections/ObservableGroup.cs renamed to CommunityToolkit.Mvvm/Collections/ObservableGroup{TKey,TValue}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Diagnostics;
99
using System.Linq;
1010

11-
namespace CommunityToolkit.Common.Collections;
11+
namespace CommunityToolkit.Mvvm.Collections;
1212

1313
/// <summary>
1414
/// An observable group.

CommunityToolkit.Common/Collections/ReadOnlyObservableGroupedCollection.cs renamed to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroupedCollection{TKey,TValue}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Diagnostics;
1010
using System.Linq;
1111

12-
namespace CommunityToolkit.Common.Collections;
12+
namespace CommunityToolkit.Mvvm.Collections;
1313

1414
/// <summary>
1515
/// A read-only list of groups.

CommunityToolkit.Common/Collections/ReadOnlyObservableGroup.cs renamed to CommunityToolkit.Mvvm/Collections/ReadOnlyObservableGroup{TKey,TValue}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Collections.ObjectModel;
77
using System.Linq;
88

9-
namespace CommunityToolkit.Common.Collections;
9+
namespace CommunityToolkit.Mvvm.Collections;
1010

1111
/// <summary>
1212
/// A read-only observable group. It associates a <see cref="Key"/> to a <see cref="ReadOnlyObservableCollection{T}"/>.

tests/CommunityToolkit.Common.UnitTests/Collections/IntGroup.cs renamed to tests/CommunityToolkit.Mvvm.UnitTests/Collections/IntGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77

8-
namespace CommunityToolkit.Common.UnitTests.Collections;
8+
namespace CommunityToolkit.Mvvm.UnitTests;
99

1010
public class IntGroup : List<int>, IGrouping<string, int>
1111
{

tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupTests.cs renamed to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
using System.Collections.Specialized;
66
using System.Linq;
7-
using CommunityToolkit.Common.Collections;
7+
using CommunityToolkit.Mvvm.Collections;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
99

10-
namespace CommunityToolkit.Common.UnitTests.Collections;
10+
namespace CommunityToolkit.Mvvm.UnitTests;
1111

1212
[TestClass]
1313
public class ObservableGroupTests

tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs renamed to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
using System;
66
using System.Linq;
7-
using CommunityToolkit.Common.Collections;
7+
using CommunityToolkit.Mvvm.Collections;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
99

10-
namespace CommunityToolkit.Common.UnitTests.Collections;
10+
namespace CommunityToolkit.Mvvm.UnitTests;
1111

1212
[TestClass]
1313
public class ObservableGroupedCollectionExtensionsTests

tests/CommunityToolkit.Common.UnitTests/Collections/ObservableGroupedCollectionTests.cs renamed to tests/CommunityToolkit.Mvvm.UnitTests/Collections/ObservableGroupedCollectionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
using System.Collections.Generic;
66
using System.Linq;
7-
using CommunityToolkit.Common.Collections;
7+
using CommunityToolkit.Mvvm.Collections;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
99

10-
namespace CommunityToolkit.Common.UnitTests.Collections;
10+
namespace CommunityToolkit.Mvvm.UnitTests;
1111

1212
[TestClass]
1313
public class ObservableGroupedCollectionTests

0 commit comments

Comments
 (0)