Skip to content
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

housekeeping:Seal List Internals #796

Merged
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
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/AutoRefresh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace DynamicData.List.Internal;

internal class AutoRefresh<TObject, TAny>(IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<TAny>> reEvaluator, TimeSpan? buffer = null, IScheduler? scheduler = null)
internal sealed class AutoRefresh<TObject, TAny>(IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<TAny>> reEvaluator, TimeSpan? buffer = null, IScheduler? scheduler = null)
where TObject : notnull
{
private readonly Func<TObject, IObservable<TAny>> _reEvaluator = reEvaluator ?? throw new ArgumentNullException(nameof(reEvaluator));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/ChangeSetMergeTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace DynamicData.List.Internal;

internal class ChangeSetMergeTracker<TObject>
internal sealed class ChangeSetMergeTracker<TObject>
where TObject : notnull
{
private readonly ChangeAwareList<TObject> _resultList = new();
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/DeferUntilLoaded.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace DynamicData.List.Internal;

internal class DeferUntilLoaded<T>(IObservable<IChangeSet<T>> source)
internal sealed class DeferUntilLoaded<T>(IObservable<IChangeSet<T>> source)
where T : notnull
{
private readonly IObservable<IChangeSet<T>> _source = source ?? throw new ArgumentNullException(nameof(source));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/EditDiff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace DynamicData.List.Internal;

internal class EditDiff<T>(ISourceList<T> source, IEqualityComparer<T>? equalityComparer)
internal sealed class EditDiff<T>(ISourceList<T> source, IEqualityComparer<T>? equalityComparer)
where T : notnull
{
private readonly IEqualityComparer<T> _equalityComparer = equalityComparer ?? EqualityComparer<T>.Default;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/Filter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace DynamicData.List.Internal;

internal class Filter<T>
internal sealed class Filter<T>
where T : notnull
{
private readonly ListFilterPolicy _policy;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/FilterOnObservable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace DynamicData.List.Internal;

internal class FilterOnObservable<TObject>(IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<bool>> filter, TimeSpan? buffer = null, IScheduler? scheduler = null)
internal sealed class FilterOnObservable<TObject>(IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<bool>> filter, TimeSpan? buffer = null, IScheduler? scheduler = null)
where TObject : notnull
{
private readonly Func<TObject, IObservable<bool>> _filter = filter ?? throw new ArgumentNullException(nameof(filter));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/FilterOnProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace DynamicData.List.Internal;

[Obsolete("Use AutoRefresh(), followed by Filter() instead")]
internal class FilterOnProperty<TObject, TProperty>(IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TProperty>> propertySelector, Func<TObject, bool> predicate, TimeSpan? throttle = null, IScheduler? scheduler = null)
internal sealed class FilterOnProperty<TObject, TProperty>(IObservable<IChangeSet<TObject>> source, Expression<Func<TObject, TProperty>> propertySelector, Func<TObject, bool> predicate, TimeSpan? throttle = null, IScheduler? scheduler = null)
where TObject : INotifyPropertyChanged
{
public IObservable<IChangeSet<TObject>> Run() => source.AutoRefresh(propertySelector, propertyChangeThrottle: throttle, scheduler: scheduler).Filter(predicate);
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/FilterStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace DynamicData.List.Internal;

internal class FilterStatic<T>(IObservable<IChangeSet<T>> source, Func<T, bool> predicate)
internal sealed class FilterStatic<T>(IObservable<IChangeSet<T>> source, Func<T, bool> predicate)
where T : notnull
{
private readonly Func<T, bool> _predicate = predicate ?? throw new ArgumentNullException(nameof(predicate));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/Group.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace DynamicData.List.Internal;

internal class Group<TObject, TGroup>(TGroup groupKey) : IGroup<TObject, TGroup>, IDisposable, IEquatable<Group<TObject, TGroup>>
internal sealed class Group<TObject, TGroup>(TGroup groupKey) : IGroup<TObject, TGroup>, IDisposable, IEquatable<Group<TObject, TGroup>>
where TObject : notnull
{
public TGroup GroupKey { get; } = groupKey;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/Pager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace DynamicData.List.Internal;

internal class Pager<T>(IObservable<IChangeSet<T>> source, IObservable<IPageRequest> requests)
internal sealed class Pager<T>(IObservable<IChangeSet<T>> source, IObservable<IPageRequest> requests)
where T : notnull
{
private readonly IObservable<IPageRequest> _requests = requests ?? throw new ArgumentNullException(nameof(requests));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/QueryWhenChanged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace DynamicData.List.Internal;

internal class QueryWhenChanged<T>(IObservable<IChangeSet<T>> source)
internal sealed class QueryWhenChanged<T>(IObservable<IChangeSet<T>> source)
where T : notnull
{
private readonly IObservable<IChangeSet<T>> _source = source ?? throw new ArgumentNullException(nameof(source));
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/RefCount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace DynamicData.List.Internal;

internal class RefCount<T>(IObservable<IChangeSet<T>> source)
internal sealed class RefCount<T>(IObservable<IChangeSet<T>> source)
where T : notnull
{
private readonly object _locker = new();
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/ReferenceCountTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace DynamicData.List.Internal;
/// <para>Thanks dudes.</para>
/// </summary>
/// <typeparam name="T">The type of the item.</typeparam>
internal class ReferenceCountTracker<T>
internal sealed class ReferenceCountTracker<T>
where T : notnull
{
public IEnumerable<T> Items => ReferenceCounts.Keys;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/ToObservableChangeSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace DynamicData.List.Internal;

internal class ToObservableChangeSet<TObject>
internal sealed class ToObservableChangeSet<TObject>
where TObject : notnull
{
private readonly Func<TObject, TimeSpan?>? _expireAfter;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData/List/Internal/TransformAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace DynamicData.List.Internal;

internal class TransformAsync<TSource, TDestination>
internal sealed class TransformAsync<TSource, TDestination>
where TSource : notnull
where TDestination : notnull
{
Expand Down