/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.Shared/Utils/IPersistable.cs
25 строк
922 B
d2dyno
Code Quality: Improved app startup routine (#12861)
09 июл 2023, 19:15
Не верифицирован
09 июл 2023, 19:15
db70e42
Код
Авторство
О чём код?
using System.Threading; using System.Threading.Tasks; namespace Files.Shared.Utils { /// <summary> /// Allows for data to be saved and loaded from a persistence store. /// </summary> public interface IPersistable { /// <summary> /// Asynchronously loads persisted data into memory. /// </summary> /// <param name="cancellationToken">A <see cref="CancellationToken"/> that cancels this action.</param> /// <returns>A <see cref="Task"/> that represents the asynchronous operation.</returns> Task LoadAsync(CancellationToken cancellationToken = default); /// <summary> /// Asynchronously saves data stored in memory. /// </summary> /// <param name="cancellationToken">A <see cref="CancellationToken"/> that cancels this action.</param> /// <returns>A <see cref="Task"/> that represents the asynchronous operation</returns> Task SaveAsync(CancellationToken cancellationToken = default); } }