public static void Play(MediaItem item) { Services.Application.RunOnThread(() => bus.Play(LoadMedia(item))); }
public static void Enqueue(MediaItem item) { Services.Application.RunOnThread(() => bus.Enqueue(LoadMedia(item))); }
static bool ContainsMatch(MediaItem item, Func <PropertyInfo, bool> predicate) { return(item.GetType().GetProperties().Any(predicate)); }
static bool PropertyInfoMatchesPattern(MediaItem item, PropertyInfo info, string pattern) { return(info.Name != "File" && (info.GetValue(item, null).ToString().Contains(pattern))); }
static bool ContainsMatch(MediaItem item, string pattern) { return(ContainsMatch(item, p => PropertyInfoMatchesPattern(item, p, pattern))); }