// 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.BaseModels; using StrixMusic.Sdk.CoreModels; namespace StrixMusic.Sdk.AdapterModels { /// /// A concrete class that merges multiple . /// public class MergedLibrary : MergedPlayableCollectionGroupBase, ILibrary { /// /// Initializes a new instance of the class. /// public MergedLibrary(IEnumerable sources, MergedCollectionConfig config) : base(sources, config) { } /// public override bool Equals(ICoreLibrary? other) { return other?.Name == Name; } /// public override bool Equals(object? obj) { return ReferenceEquals(this, obj) || (obj is ICoreLibrary other && Equals(other)); } /// public override int GetHashCode() { return PreferredSource.GetHashCode(); } } }