Revisions

This commit is contained in:
2026-08-09 03:54:28 +03:00
parent 2028db671f
commit 3b55d8d2f8
37 changed files with 1743 additions and 230 deletions
@@ -12,15 +12,30 @@ public struct PropertyModificationInfo
public readonly PropertyDef PropertyDef;
public string Name => PropertyDef.Name;
public readonly ulong Age;
public ulong Revision => Cursor.Revision;
public readonly ResourceCursor Cursor;
public readonly DateTime RecordedAt;
public object Value;
public PropertyModificationInfo(IResource resource, PropertyDef propertyDef, object value, ulong age)
public PropertyModificationInfo(
IResource resource,
PropertyDef propertyDef,
object value,
ResourceCursor cursor,
DateTime recordedAt)
{
Resource = resource;
PropertyDef = propertyDef;
Age = age;
Cursor = cursor;
Age = cursor.Revision;
RecordedAt = recordedAt;
Value = value;
}
public PropertyModificationInfo(IResource resource, PropertyDef propertyDef, object value, ulong age)
: this(resource, propertyDef, value, new ResourceCursor(Guid.Empty, age), DateTime.UtcNow)
{
}
}