blob: cf1045a60c4fa426740d624ed7ac184917b47400 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Core.IO
{
/// <summary>
/// Represents a <see cref="TemporaryManager"/> item.
/// </summary>
public interface ITemporaryItem
{
/// <summary>
/// Occurs when this item has been deleted.
/// </summary>
event EventHandler Deleted;
/// <summary>
/// Gets the creation date of the temporary item.
/// </summary>
DateTime Date { get; }
/// <summary>
/// Gets the path to the temporary item.
/// </summary>
String Path { get; }
/// <summary>
/// Gets the optional item tag.
/// </summary>
Object Tag { get; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="ITemporaryItem"/> should not be deleted by a parent item.
/// </summary>
bool Persist { get; set; }
/// <summary>
/// Gets the collection of child items.
/// </summary>
IReadOnlyCollection<ITemporaryItem> Items { get; }
/// <summary>
/// Adds a child item.
/// </summary>
/// <param name="item">The item.</param>
ITemporaryItem AddItem(ITemporaryItem item);
/// <summary>
/// Removes the specified child item.
/// </summary>
/// <param name="item">The item.</param>
void RemoveItem(ITemporaryItem item);
/// <summary>
/// Deletes the temporary item.
/// </summary>
/// <returns>True is deletion was successful.</returns>
bool Delete();
/// <summary>
/// Deletes the temporary item asynchronously.
/// </summary>
/// <returns>True is deletion was successful.</returns>
Task<bool> DeleteAsync();
/// <summary>
/// Makes the temporary item visible to the user somehow.
/// </summary>
void Display();
}
}
|