-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Right now our RemoteResources only track the remoteId of the file in question.
harmony/src/SIL.Harmony/Resource/RemoteResource.cs
Lines 8 to 34 in 5a660d1
| public class RemoteResource: IObjectBase<RemoteResource> | |
| { | |
| public Guid Id { get; init; } | |
| public DateTimeOffset? DeletedAt { get; set; } | |
| /// <summary> | |
| /// will be null when the resource has not been uploaded yet | |
| /// </summary> | |
| public string? RemoteId { get; set; } | |
| public Guid[] GetReferences() | |
| { | |
| return []; | |
| } | |
| public void RemoveReference(Guid id, CommitBase commit) | |
| { | |
| } | |
| public IObjectBase Copy() | |
| { | |
| return new RemoteResource | |
| { | |
| Id = Id, | |
| RemoteId = RemoteId, | |
| DeletedAt = DeletedAt | |
| }; | |
| } | |
| } |
we would like to track metadata aswell, this could include stuff like author, copyright etc. For storing the data I think it should be unopinionated and just store a blob of json. We should use either a JsonDocument or JsonNode, I'm not sure which would be ideal, you can read about it here. https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/use-dom#json-dom-choices
Note that JsonDocument is IDisposable and would need to be disposed when done, that may not be possible to manage.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels