using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.Core.IO { /// /// Represents a item. /// public interface ITemporaryItem { /// /// Occurs when this item has been deleted. /// event EventHandler Deleted; /// /// Gets the creation date of the temporary item. /// DateTime Date { get; } /// /// Gets the path to the temporary item. /// String Path { get; } /// /// Gets the optional item tag. /// Object Tag { get; } /// /// Gets or sets a value indicating whether this should not be deleted by a parent item. /// bool Persist { get; set; } /// /// Gets the collection of child items. /// IReadOnlyCollection Items { get; } /// /// Adds a child item. /// /// The item. ITemporaryItem AddItem(ITemporaryItem item); /// /// Removes the specified child item. /// /// The item. void RemoveItem(ITemporaryItem item); /// /// Deletes the temporary item. /// /// True is deletion was successful. bool Delete(); /// /// Deletes the temporary item asynchronously. /// /// True is deletion was successful. Task DeleteAsync(); /// /// Makes the temporary item visible to the user somehow. /// void Display(); } }