1
0
mirror of synced 2024-12-02 14:57:16 +01:00
TaikoSoundEditor/Collections/MusicAttributes.cs

24 lines
513 B
C#
Raw Normal View History

2023-10-01 18:40:41 +02:00
using System.Linq;
using TaikoSoundEditor.Data;
2023-07-17 10:20:00 +02:00
2023-10-01 18:40:41 +02:00
namespace TaikoSoundEditor.Collections
2023-07-17 10:20:00 +02:00
{
2023-10-01 18:40:41 +02:00
public class MusicAttributes : Collection<IMusicAttribute>
2023-07-17 10:20:00 +02:00
{
2023-10-01 18:40:41 +02:00
public IMusicAttribute GetByUniqueId(int id)
2023-07-17 10:20:00 +02:00
{
return Items.Find(x => x.UniqueId == id);
}
public int GetNewId()
{
return Items.Max(i => i.UniqueId) + 1;
}
public bool IsValidSongId(string id)
{
return !Items.Any(i => i.Id == id);
}
}
}