Skip to content

Commit

Permalink
Update package refs and pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
feordin committed Feb 7, 2025
1 parent b25ecfa commit cd7eb3d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 33 deletions.
14 changes: 4 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@
</PropertyGroup>
<!-- SDK Packages -->
<Choose>
<When Condition="'$(TargetFramework)' == 'net6.0'">
<PropertyGroup>
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
<MediatRVersion>12.4.1</MediatRVersion>
<LoggingVersion>8.0.2</LoggingVersion>
<SdkPackageVersion>8.0</SdkPackageVersion>
<AspNetPackageVersion>6.0</AspNetPackageVersion>
</PropertyGroup>
</When>
<When Condition="'$(TargetFramework)' == 'net8.0'">
<PropertyGroup>
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
<MediatRVersion>12.4.1</MediatRVersion>
<LoggingVersion>8.0.2</LoggingVersion>
<SdkPackageVersion>8.0</SdkPackageVersion>
<AspNetPackageVersion>8.0</AspNetPackageVersion>
<JsonVersion>8.0.1</JsonVersion>
</PropertyGroup>
</When>
<Otherwise>
Expand All @@ -31,6 +23,7 @@
<LoggingVersion>9.0.1</LoggingVersion>
<SdkPackageVersion>9.0.0</SdkPackageVersion>
<AspNetPackageVersion>9.0.0</AspNetPackageVersion>
<JsonVersion>9.0.1</JsonVersion>
</PropertyGroup>
</Otherwise>
</Choose>
Expand Down Expand Up @@ -89,7 +82,7 @@
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="$(JsonVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(SdkPackageVersion)" />
Expand Down Expand Up @@ -147,5 +140,6 @@
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.8" />
<PackageVersion Include="Moq" Version="4.20.69" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
</Project>
11 changes: 2 additions & 9 deletions build/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,14 @@ stages:
targetBuildFramework: $(defaultBuildFramework)
unitTest: false
codeCoverage: true
- job: Windows_dotnet8
pool:
name: '$(DefaultWindowsPool)'
steps:
- template: ./jobs/build.yml
parameters:
targetBuildFramework: 'net8.0'
- job: Linux_dotnet6
- job: Linux_dotnet8
pool:
name: '$(DefaultLinuxPool)'
vmImage: '$(LinuxVmImage)'
steps:
- template: ./jobs/build.yml
parameters:
targetBuildFramework: 'net6.0'
targetBuildFramework: 'net8.0'

- stage: BuildArtifacts
displayName: 'Build artifacts'
Expand Down
11 changes: 2 additions & 9 deletions build/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,14 @@ stages:
targetBuildFramework: $(defaultBuildFramework)
unitTest: false
codeCoverage: true
- job: Windows_dotnet8
pool:
name: '$(DefaultWindowsPool)'
steps:
- template: ./jobs/build.yml
parameters:
targetBuildFramework: 'net8.0'
- job: Linux_dotnet6
- job: Linux_dotnet8
pool:
name: '$(DefaultLinuxPool)'
vmImage: '$(LinuxVmImage)'
steps:
- template: ./jobs/build.yml
parameters:
targetBuildFramework: 'net6.0'
targetBuildFramework: 'net8.0'

- stage: BuildArtifacts
displayName: 'Build artifacts'
Expand Down
12 changes: 7 additions & 5 deletions src/Microsoft.Health.Fhir.Core/Models/ResourceElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Microsoft.Health.Fhir.Core.Models
/// </summary>
public class ResourceElement : IResourceElement
{
private readonly Lazy<EvaluationContext> _context;
private readonly List<string> _nonDomainTypes = new List<string>
{
"Bundle",
Expand All @@ -29,7 +30,8 @@ public ResourceElement(ITypedElement instance)
{
EnsureArg.IsNotNull(instance, nameof(instance));

Instance = instance;
_context = new Lazy<EvaluationContext>(() =>
new EvaluationContext().WithResourceOverrides(instance));
}

internal ResourceElement(ITypedElement instance, object resourceInstance)
Expand All @@ -55,7 +57,7 @@ public DateTimeOffset? LastUpdated
{
get
{
var obj = Instance.Scalar("Resource.meta.lastUpdated");
var obj = Instance.Scalar("Resource.meta.lastUpdated", _context.Value);
if (obj != null)
{
return PrimitiveTypeConverter.ConvertTo<DateTimeOffset>(obj.ToString());
Expand All @@ -67,18 +69,18 @@ public DateTimeOffset? LastUpdated

public T Scalar<T>(string fhirPath)
{
object scalar = Instance.Scalar(fhirPath);
object scalar = Instance.Scalar(fhirPath, _context.Value);
return (T)scalar;
}

public IEnumerable<ITypedElement> Select(string fhirPath)
{
return Instance.Select(fhirPath);
return Instance.Select(fhirPath, _context.Value);
}

public bool Predicate(string fhirPath)
{
return Instance.Predicate(fhirPath);
return Instance.Predicate(fhirPath, _context.Value);
}
}
}

0 comments on commit cd7eb3d

Please # to comment.