private Model.Lyric InnerGetLyric(string artist, string title, int duration, bool useTranslated, bool useCache = false) { if (useCache && TryGetCache(title, artist, duration, useTranslated, out Model.Lyric cached)) { return(cached); } Model.Lyric lyric = _sourceProvider?.ProvideLyric(artist, title, duration, useTranslated); if (useCache) { WriteCache(title, artist, duration, lyric); } return(lyric); }
private static bool TryGetCache(string title, string artist, int duration, bool useTranslated, out Model.Lyric lyric) { throw new NotImplementedException(); }
private static void WriteCache(string title, string artist, int duration, Model.Lyric lyric) { throw new NotImplementedException(); }