using System.Threading.Tasks; namespace SweetLib.Storage { /// /// Interface for objects which can be stored and restored. /// /// Type of the used identifier. public interface IStorable : IIdentified { /// /// Stores the object. /// /// Task Store(); /// /// Restores an object. /// /// Identifier of the object to restore. /// Task Restore(T identifier); /// /// Determines whether the current object instance is new or already exists. /// /// Boolean indicating if the current object instance is new or already exists. bool IsNew(); } }