Hi,
Yeah the service is probably missing a single export method, the exports all happen in response to Notifications so they are always already in the handlers, so the service isn’t needed here.
but if we where to add one (and we probably will just for completeness
) something like this would export a single item.
public async Task<IEnumerable<uSyncAction>> ExportSingleItem(Udi udi, SyncHandlerOptions options)
{
var folders = _uSyncConfig.GetFolders();
var handler = _handlerFactory.GetValidHandlerByEntityType(udi.EntityType, options);
if (handler == null)
return [uSyncAction.Fail("Single", "Not Found", udi.EntityType, ChangeType.Fail, "Could not find handler", new KeyNotFoundException(udi.EntityType))];
return await handler.Handler.ExportAsync(udi, folders, handler.Settings);
}