1
0
mirror of synced 2024-11-24 04:20:10 +01:00
TaikoSoundEditor/Collections/MusicAttributes.cs
2023-10-01 19:40:41 +03:00

24 lines
513 B
C#

using System.Linq;
using TaikoSoundEditor.Data;
namespace TaikoSoundEditor.Collections
{
public class MusicAttributes : Collection<IMusicAttribute>
{
public IMusicAttribute GetByUniqueId(int id)
{
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);
}
}
}