From 14494b0847ce889a3b54e1898a364010df4bda96 Mon Sep 17 00:00:00 2001 From: v-ajajvanu <169024993+v-ajajvanu@users.noreply.github.com> Date: Fri, 6 Sep 2024 03:54:15 +0530 Subject: [PATCH] 100880 set 3 changes (#4599) --- .../Features/Search/TypedElementSearchIndexer.cs | 4 ++-- .../Features/Validation/ResourceNotValidException.cs | 4 ++-- .../MutuallyExclusiveOptionValidator.cs | 2 +- .../Filters/ValidateContentTypeFilterAttributeTests.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.Health.Fhir.Core/Features/Search/TypedElementSearchIndexer.cs b/src/Microsoft.Health.Fhir.Core/Features/Search/TypedElementSearchIndexer.cs index 4dae486f41..ffbc69ca73 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Search/TypedElementSearchIndexer.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Search/TypedElementSearchIndexer.cs @@ -75,7 +75,7 @@ public IReadOnlyCollection Extract(ResourceElement resource) // This allow to resolve %resource FhirPath to provided value. context.Resource = resource.Instance; - IEnumerable searchParameters = _searchParameterDefinitionManager.GetSearchParameters(resource.InstanceType); + var searchParameters = _searchParameterDefinitionManager.GetSearchParameters(resource.InstanceType).ToList(); foreach (SearchParameterInfo searchParameter in searchParameters) { @@ -261,7 +261,7 @@ private List ExtractSearchValues( continue; } - IEnumerable searchValues = converter.ConvertTo(extractedValue); + var searchValues = converter.ConvertTo(extractedValue).ToList(); if (searchValues != null) { diff --git a/src/Microsoft.Health.Fhir.Core/Features/Validation/ResourceNotValidException.cs b/src/Microsoft.Health.Fhir.Core/Features/Validation/ResourceNotValidException.cs index 4df127ebf9..2d71bd4406 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Validation/ResourceNotValidException.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Validation/ResourceNotValidException.cs @@ -13,7 +13,7 @@ namespace Microsoft.Health.Fhir.Core.Features.Validation { public class ResourceNotValidException : FhirException { - public ResourceNotValidException(IEnumerable validationFailures) + public ResourceNotValidException(IReadOnlyCollection validationFailures) { EnsureArg.IsNotNull(validationFailures, nameof(validationFailures)); @@ -23,7 +23,7 @@ public ResourceNotValidException(IEnumerable validationFa } } - public ResourceNotValidException(IEnumerable validationFailures) + public ResourceNotValidException(IReadOnlyCollection validationFailures) { EnsureArg.IsNotNull(validationFailures, nameof(validationFailures)); diff --git a/src/Microsoft.Health.Fhir.SchemaManager/MutuallyExclusiveOptionValidator.cs b/src/Microsoft.Health.Fhir.SchemaManager/MutuallyExclusiveOptionValidator.cs index eb28a06929..962f1936a2 100644 --- a/src/Microsoft.Health.Fhir.SchemaManager/MutuallyExclusiveOptionValidator.cs +++ b/src/Microsoft.Health.Fhir.SchemaManager/MutuallyExclusiveOptionValidator.cs @@ -17,7 +17,7 @@ public static class MutuallyExclusiveOptionValidator /// The result of the command being run /// The list of mutually exclusive options /// The message to show if only one of the option is not present - public static void Validate(CommandResult commandResult, IEnumerable