Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netstandard2.1 as a target #256

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions firely-validator-api.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>Firely</Authors>
<Company>Firely (https://fire.ly)</Company>
<Copyright>Copyright 2015-2022 Firely</Copyright>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;netstandard2.1</TargetFrameworks>
<RepositoryUrl>https://github.com/FirelyTeam/firely-validator-api</RepositoryUrl>
</PropertyGroup>

Expand Down Expand Up @@ -38,15 +38,14 @@
<AssemblyOriginatorKeyFile>..\..\FirelyValidatorPubKey.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LibraryPKHash>0024000004800000940000000602000000240000525341310004000001000100c11eea5df3095844b027f018b356bc326a5a30b1f245010ad789589aa685569b2eb7f5f2ea5c49dafed338e3d9969eab21848c6c20a6b0a22c5ff7797d9a5062d7f3e42478e905d72a3dde344086a003f2df9deeb838e206d92c8cc59150c3151e9490381321f77a716e0a2b24a585b302ba2b3db37966a3da9abe4c601ba4c1</LibraryPKHash>
<WarningsNotAsErrors>NU5104</WarningsNotAsErrors>
</PropertyGroup>

<PropertyGroup>
<!-- Error CS4014 Because this call is not awaited, execution of the current method continues before the call is completed.
Consider applying the 'await' operator to the result of the call. -->
<WarningsAsErrors>CS4014</WarningsAsErrors>
<WarningsNotAsErrors>NU5104</WarningsNotAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>
6 changes: 5 additions & 1 deletion src/Firely.Fhir.Validation/Impl/ChildrenValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* via any medium is strictly prohibited.
*/

using Hl7.Fhir.ElementModel;
using Hl7.Fhir.Support;
using Hl7.Fhir.Utility;
using Newtonsoft.Json.Linq;
Expand Down Expand Up @@ -118,8 +117,13 @@ public ResultReport Validate(IScopedNode input, ValidationSettings vc, Validatio
/// <inheritdoc />
public bool ContainsKey(string key) => _childList.ContainsKey(key);

#if NET8_0
/// <inheritdoc />
public bool TryGetValue(string key, [MaybeNullWhen(false)] out IAssertion value) => _childList.TryGetValue(key, out value);
#else
/// <inheritdoc />
public bool TryGetValue(string key, out IAssertion value) => _childList.TryGetValue(key, out value);
#endif

/// <inheritdoc />
public IEnumerator<KeyValuePair<string, IAssertion>> GetEnumerator() => ((IEnumerable<KeyValuePair<string, IAssertion>>)_childList).GetEnumerator();
Expand Down