mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-07 03:47:56 +08:00
9731cdee67
This reverts commit c651a4b36e
.
23 lines
712 B
C#
23 lines
712 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
namespace Wox.Infrastructure.Storage
|
|
{
|
|
public interface IStorage<T>
|
|
{
|
|
/// <summary>
|
|
/// Saves the data
|
|
/// </summary>
|
|
/// <param name="data">data to be saved</param>
|
|
void Save(T data);
|
|
|
|
/// <summary>
|
|
/// Attempts to load data, otherwise it will return the default provided
|
|
/// </summary>
|
|
/// <param name="defaultData">default data value</param>
|
|
/// <returns>The loaded data or default</returns>
|
|
T TryLoad(T defaultData);
|
|
}
|
|
}
|