Exemplo n.º 1
0
        /// <inheritdoc />
        public void Save(string email, MusicallyCache cache)
        {
            var fileName = GetFileName(email);

            File.WriteAllText(fileName, JsonConvert.SerializeObject(cache, Formatting.Indented));
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Called automatically when constructing <see cref="MusicallyClient"/>.
 /// </summary>
 public void LoadCache()
 {
     Cache = _cacheHandler != null?_cacheHandler.Load(_username) : new MusicallyCache();
 }