-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'cf1e39a0405acac1a1382982dd9bf954d2d17d93' into bugfix/2…
…854-fix-validate-code
- Loading branch information
Showing
19 changed files
with
143 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids --> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:Hl7.Fhir.Specification.Snapshot.RegenerationSettings</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:Hl7.Fhir.Specification.Snapshot.RegenerationSettings</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.get_RegenerationBehaviour</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.set_RegenerationBehaviour(Hl7.Fhir.Specification.Snapshot.RegenerationSettings)</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.get_RegenerationBehaviour</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.set_RegenerationBehaviour(Hl7.Fhir.Specification.Snapshot.RegenerationSettings)</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.Conformance.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
</Suppressions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids --> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:Hl7.Fhir.Specification.Snapshot.RegenerationSettings</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:Hl7.Fhir.Specification.Snapshot.RegenerationSettings</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.get_RegenerationBehaviour</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.set_RegenerationBehaviour(Hl7.Fhir.Specification.Snapshot.RegenerationSettings)</Target> | ||
<Left>lib/net8.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/net8.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.get_RegenerationBehaviour</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorSettings.set_RegenerationBehaviour(Hl7.Fhir.Specification.Snapshot.RegenerationSettings)</Target> | ||
<Left>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Left> | ||
<Right>lib/netstandard2.0/Hl7.Fhir.STU3.dll</Right> | ||
<IsBaselineSuppression>true</IsBaselineSuppression> | ||
</Suppression> | ||
</Suppressions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* | ||
/* | ||
* Copyright (c) 2017, Firely ([email protected]) and contributors | ||
* See the file CONTRIBUTORS for details. | ||
* | ||
|
@@ -7,7 +7,6 @@ | |
*/ | ||
|
||
using Hl7.Fhir.Utility; | ||
using System; | ||
|
||
namespace Hl7.Fhir.Specification.Snapshot | ||
{ | ||
|
@@ -35,7 +34,7 @@ public void CopyTo(SnapshotGeneratorSettings other) | |
{ | ||
if (other == null) { throw Error.ArgumentNull(nameof(other)); } | ||
other.GenerateSnapshotForExternalProfiles = GenerateSnapshotForExternalProfiles; | ||
other.RegenerationBehaviour = RegenerationBehaviour; | ||
other.ForceRegenerateSnapshots = ForceRegenerateSnapshots; | ||
other.GenerateExtensionsOnConstraints = GenerateExtensionsOnConstraints; | ||
other.GenerateAnnotationsOnConstraints = GenerateAnnotationsOnConstraints; | ||
other.GenerateElementIds = GenerateElementIds; | ||
|
@@ -56,18 +55,7 @@ public void CopyTo(SnapshotGeneratorSettings other) | |
/// Re-generated snapshots are annotated to prevent duplicate re-generation (assuming the provided resource resolver uses caching). | ||
/// If disabled (default), then the snapshot generator relies on existing snapshot components, if they exist. | ||
/// </summary> | ||
[Obsolete( | ||
"This setting does not work as intended. We will maintain the old behaviour for now, and we will consider removing it in a future major release. Use the new RegenerationBehaviour setting instead. See also https://github.com/FirelyTeam/firely-net-sdk/pull/2803")] | ||
public bool ForceRegenerateSnapshots | ||
{ | ||
get { return this.RegenerationBehaviour == RegenerationSettings.REGENERATE_ONCE; } | ||
set { this.RegenerationBehaviour = value ? RegenerationSettings.REGENERATE_ONCE : RegenerationSettings.TRY_USE_EXISTING; } | ||
} // ForceExpandAll | ||
|
||
/// <summary> | ||
/// Setting for the regeneration behaviour of the snapshot generator. see <see cref="RegenerationSettings"/>. | ||
/// </summary> | ||
public RegenerationSettings RegenerationBehaviour { get; set; } | ||
public bool ForceRegenerateSnapshots { get; set; } = false; // ForceExpandAll | ||
|
||
/// <summary> | ||
/// Enable this setting to add a custom <see cref="SnapshotGeneratorExtensions.CONSTRAINED_BY_DIFF_EXT"/> extension | ||
|
@@ -96,24 +84,4 @@ public bool ForceRegenerateSnapshots | |
// <remarks>See GForge #9791</remarks> | ||
// public bool MergeTypeProfiles { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Settings for defining the behaviour of the snapshot generator with respect to regenerating snapshots. | ||
/// </summary> | ||
public enum RegenerationSettings | ||
{ | ||
/// <summary> | ||
/// Try to use an existing snapshot, if available. | ||
/// </summary> | ||
TRY_USE_EXISTING, | ||
/// <summary> | ||
/// Regenerate the snapshot once, to ensure it is up-to-date. | ||
/// </summary> | ||
REGENERATE_ONCE, | ||
/// <summary> | ||
/// Regenerate the snapshot every time. This is useful for debugging and testing purposes. | ||
/// </summary> | ||
[Obsolete("Watch out when using this setting! it could lead to infinite recursion and is mainly meant for debugging and testing purposes. If you previously had ForceRegenerateSnapshots set to true, consider using REGENERATE_ONCE instead.")] | ||
FORCE_REGENERATE, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.