Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions uSync.Core/Serialization/Serializers/ContentTemplateSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ public override Task SaveItemAsync(IContent item)
contentService.SaveBlueprint(item);
});

/// <remarks>
/// has to save via SaveBlueprint, the inherited ContentSerializer.SaveAsync would
/// save through IContentService.Save, and that persists the item with the Document
/// node object type - so the blueprint stops being a blueprint.
/// </remarks>
public override Task SaveAsync(IEnumerable<IContent> items)
=> uSyncTaskHelper.FromResultOf(() =>
{
foreach (var item in items)
{
contentService.SaveBlueprint(item);
}
});

public override Task DeleteItemAsync(IContent item)
=> uSyncTaskHelper.FromResultOf(() =>
{
Expand Down