// 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;
using System.Collections.Generic;
using System.Linq;
namespace StrixMusic.Sdk.AdapterModels;
///
/// Provides configuration options for a .
///
public class MergedCollectionConfig
{
private MergedCollectionSorting _mergedCollectionSorting;
private IReadOnlyList _coreRanking = new List();
///
/// Creates a new instance of .
///
public MergedCollectionConfig()
{
}
///
/// Creates a new instance of .
///
public MergedCollectionConfig(MergedCollectionSorting mergedCollectionSorting, IEnumerable coreRanking)
{
_mergedCollectionSorting = mergedCollectionSorting;
_coreRanking = coreRanking.ToList();
}
///
/// The user's preference for how items in a collection from multiple sources are sorted.
///
public MergedCollectionSorting MergedCollectionSorting
{
get => _mergedCollectionSorting;
set => _mergedCollectionSorting = value;
}
///
/// The user's preferred ranking for each core, stored as the core's instance ID. Highest ranking first.
///
public IReadOnlyList CoreRanking
{
get => _coreRanking;
set => _coreRanking = value;
}
///
/// Raised when is changed.
///
public event EventHandler>? CoreRankingChanged;
///
/// Raised when is changed.
///
public event EventHandler? MergedCollectionSortingChanged;
}