/// <summary>
        /// Loads objects from file
        /// </summary>
        /// <returns>
        /// List of loaded objects, wrapped in an awaitable Task.
        /// </returns>
        ///

        public async Task <Dictionary <TKey, T> > Load()
        {
            string data = await _stringPersistence.LoadAsync(_fileName);

            List <T> list = _stringConverter.ConvertFromString(data);

            return(DictionaryFromList(list));
        }
Пример #2
0
        /// <summary>
        /// Loads objects from file
        /// </summary>
        /// <returns>
        /// List of loaded objects, wrapped in an awaitable Task.
        /// </returns>
        public async Task <List <T> > Load()
        {
            string data = await _stringPersistence.LoadAsync(_fileName);

            return(_stringConverter.ConvertFromString(data));
        }