Skip to content

Move collection types to MVVM Toolkit #151

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

Merged
merged 3 commits into from
Mar 19, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@

using System.ComponentModel;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Linq;
using System.Runtime.CompilerServices;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

/// <summary>
/// The extensions methods to simplify the usage of <see cref="ObservableGroupedCollection{TKey, TValue}"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Linq;
using System.Runtime.CompilerServices;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

/// <summary>
/// An observable list of observable groups.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Diagnostics;
using System.Linq;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

/// <summary>
/// An observable group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Diagnostics;
using System.Linq;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

/// <summary>
/// A read-only list of groups.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.ObjectModel;
using System.Linq;

namespace CommunityToolkit.Common.Collections;
namespace CommunityToolkit.Mvvm.Collections;

/// <summary>
/// A read-only observable group. It associates a <see cref="Key"/> to a <see cref="ReadOnlyObservableCollection{T}"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Linq;

namespace CommunityToolkit.Common.UnitTests.Collections;
namespace CommunityToolkit.Mvvm.UnitTests;

public class IntGroup : List<int>, IGrouping<string, int>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down