Upload FastSeekWpf/Core/IndexEvent.cs
Browse files
FastSeekWpf/Core/IndexEvent.cs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
namespace FastSeekWpf.Core;
|
| 2 |
+
|
| 3 |
+
public abstract class IndexEvent
|
| 4 |
+
{
|
| 5 |
+
public class Created : IndexEvent
|
| 6 |
+
{
|
| 7 |
+
public FileRecord Record { get; }
|
| 8 |
+
public Created(FileRecord record) => Record = record;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
public class Deleted : IndexEvent
|
| 12 |
+
{
|
| 13 |
+
public ulong FileRef { get; }
|
| 14 |
+
public Deleted(ulong fileRef) => FileRef = fileRef;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
public class Renamed : IndexEvent
|
| 18 |
+
{
|
| 19 |
+
public ulong OldRef { get; }
|
| 20 |
+
public FileRecord NewRecord { get; }
|
| 21 |
+
public Renamed(ulong oldRef, FileRecord newRecord)
|
| 22 |
+
{
|
| 23 |
+
OldRef = oldRef;
|
| 24 |
+
NewRecord = newRecord;
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
public class Moved : IndexEvent
|
| 29 |
+
{
|
| 30 |
+
public ulong FileRef { get; }
|
| 31 |
+
public ulong NewParentRef { get; }
|
| 32 |
+
public string Name { get; }
|
| 33 |
+
public FileKind Kind { get; }
|
| 34 |
+
public Moved(ulong fileRef, ulong newParentRef, string name, FileKind kind)
|
| 35 |
+
{
|
| 36 |
+
FileRef = fileRef;
|
| 37 |
+
NewParentRef = newParentRef;
|
| 38 |
+
Name = name;
|
| 39 |
+
Kind = kind;
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|