Skip to content

Commit

Permalink
Snapshot generator should work correctly now
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasdejong committed Apr 3, 2024
1 parent 66a4e6c commit 297d69a
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,18 @@ private static IAsyncResourceResolver verifySource(IAsyncResourceResolver resolv
/// <param name="structure">A <see cref="StructureDefinition"/> instance.</param>
public async T.Task UpdateAsync(StructureDefinition structure)
{
if (structure.Differential != null)
{
var result = await GenerateAsync(structure).ConfigureAwait(false);

if(result == null) return;

structure.Snapshot = new StructureDefinition.SnapshotComponent()
{
Element = await GenerateAsync(structure).ConfigureAwait(false)
Element = result
};
structure.Snapshot.SetCreatedBySnapshotGenerator();
}

// [WMR 20170209] TODO: also merge global StructureDefinition.Mapping components
// structure.Mappings = ElementDefnMerger.Merge(...)
// [WMR 20170209] TODO: also merge global StructureDefinition.Mapping components
// structure.Mappings = ElementDefnMerger.Merge(...)
}

/// <inheritdoc cref="UpdateAsync(StructureDefinition)"/>
Expand Down

0 comments on commit 297d69a

Please sign in to comment.