// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System.Collections.Generic;
using StrixMusic.Sdk.AppModels;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Sdk.AdapterModels
{
///
/// A concrete class that merges multiple .
///
public sealed class MergedSearchResults : MergedPlayableCollectionGroupBase, ISearchResults
{
///
/// Initializes a new instance of the class.
///
public MergedSearchResults(IEnumerable searchResults, MergedCollectionConfig config)
: base(searchResults, config)
{
}
///
IReadOnlyList IMerged.Sources => StoredSources;
///
public override bool Equals(ICoreSearchResults? other)
{
// TODO: Merge together based on query
// return other?.Name == Name;
return false;
}
///
public override bool Equals(object? obj)
{
return ReferenceEquals(this, obj) || (obj is ICoreSearchResults other && Equals(other));
}
///
public override int GetHashCode()
{
return PreferredSource.GetHashCode();
}
}
}