public bool TryGetUniqueResourceInfo(AudioResource resource, out IReadonlyUniqueResourceInfo info) { if (uniqueSongs.TryGetValue(resource, out var v)) { info = v; return(true); } info = null; return(false); }
public static PlaylistSearchItemInfo Convert(IReadonlyUniqueResourceInfo info) { var r = new PlaylistSearchItemInfo(); r.ResourceTitle = info.Resource.ResourceTitle; r.ResourceId = info.Resource.ResourceId; r.ResourceType = info.Resource.AudioType; r.ContainingLists = info.ContainingLists.Select(kv => new ContainingListInfo { Id = kv.Key, Index = kv.Value }).ToList(); return(r); }
public bool TryGetUniqueResourceInfo(AudioResource resource, out IReadonlyUniqueResourceInfo info) { return(resourcesDatabase.TryGetUniqueResourceInfo(resource, out info)); }