diff --git a/src/Hl7.Fhir.Base/CompatibilitySuppressions.xml b/src/Hl7.Fhir.Base/CompatibilitySuppressions.xml index 362003322f..e102c431e8 100644 --- a/src/Hl7.Fhir.Base/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.Base/CompatibilitySuppressions.xml @@ -57,6 +57,13 @@ lib/net8.0/Hl7.Fhir.Base.dll true + + CP0001 + T:Hl7.Fhir.Rest.Prefer + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + CP0001 T:Hl7.Fhir.Serialization.BaseFhirSerializer @@ -134,6 +141,13 @@ lib/net8.0/Hl7.Fhir.Base.dll true + + CP0001 + T:Hl7.Fhir.Validation.ValidateEnumCodeAttribute + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + CP0002 F:Hl7.Fhir.ElementModel.ScopedNode.Parent @@ -148,6 +162,13 @@ lib/net8.0/Hl7.Fhir.Base.dll true + + CP0002 + F:Hl7.Fhir.Rest.ContentType.VERSION_CONTENT_HEADER + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + CP0002 F:Hl7.Fhir.Serialization.FhirJsonException.INCOMPATIBLE_SIMPLE_VALUE_CODE @@ -169,6 +190,13 @@ lib/net8.0/Hl7.Fhir.Base.dll true + + CP0002 + F:Hl7.Fhir.Serialization.FhirXmlException.ENCOUNTERED_DTP_REFERENCES_CODE + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + CP0002 F:Hl7.FhirPath.Functions.EqualityOperators.TypedElementEqualityComparer @@ -330,6 +358,20 @@ lib/net8.0/Hl7.Fhir.Base.dll true + + CP0002 + M:Hl7.Fhir.Introspection.ClassMapping.get_IsNestedType + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Introspection.ClassMapping.set_IsNestedType(System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + CP0002 M:Hl7.Fhir.Introspection.FhirTypeAttribute.get_IsNestedType @@ -451,329 +493,896 @@ CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Continue(Hl7.Fhir.Model.Bundle,Hl7.Fhir.Rest.PageDirection) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Create``1(``0,Hl7.Fhir.Rest.SearchParams) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.get_Settings + M:Hl7.Fhir.Rest.BaseFhirClient.Create``1(``0) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.CreateAsync``1(``0,Hl7.Fhir.Rest.SearchParams,System.Nullable{System.Threading.CancellationToken}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) + M:Hl7.Fhir.Rest.BaseFhirClient.Delete(Hl7.Fhir.Model.Resource) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.get_Release + M:Hl7.Fhir.Rest.BaseFhirClient.Delete(System.String,Hl7.Fhir.Rest.SearchParams) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.get_Settings + M:Hl7.Fhir.Rest.BaseFhirClient.Delete(System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.Serialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},System.Text.Json.Utf8JsonWriter) + M:Hl7.Fhir.Rest.BaseFhirClient.Delete(System.Uri) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.SerializeToString(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object}) + M:Hl7.Fhir.Rest.BaseFhirClient.DeleteAsync(System.String,Hl7.Fhir.Rest.SearchParams,System.Nullable{System.Threading.CancellationToken}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) + M:Hl7.Fhir.Rest.BaseFhirClient.Get(System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.get_Release + M:Hl7.Fhir.Rest.BaseFhirClient.Get(System.Uri) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.Serialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},System.Xml.XmlWriter,Hl7.Fhir.Serialization.SerializationFilter) + M:Hl7.Fhir.Rest.BaseFhirClient.History(System.String,System.Nullable{System.DateTimeOffset},System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.SerializeToString(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},Hl7.Fhir.Serialization.SerializationFilter) + M:Hl7.Fhir.Rest.BaseFhirClient.History(System.Uri,System.Nullable{System.DateTimeOffset},System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJObject(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.InstanceOperation(System.Uri,System.String,Hl7.Fhir.Model.Parameters,System.Boolean) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJObject(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Operation(System.Uri,Hl7.Fhir.Model.Parameters,System.Boolean) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJson(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Operation(System.Uri,System.String,Hl7.Fhir.Model.Parameters,System.Boolean) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJson(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Patch(System.Uri,Hl7.Fhir.Model.Parameters) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonAsync(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Patch``1(Hl7.Fhir.Rest.SearchParams,Hl7.Fhir.Model.Parameters) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Patch``1(System.String,Hl7.Fhir.Model.Parameters,System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonBytes(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.PatchAsync``1(Hl7.Fhir.Rest.SearchParams,Hl7.Fhir.Model.Parameters,System.Nullable{System.Threading.CancellationToken}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonBytesAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.ProcessMessage(Hl7.Fhir.Model.Bundle,System.Boolean,System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ISourceNode,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Read``1(System.String,System.String,System.Nullable{System.DateTimeOffset}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ITypedElement,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Read``1(System.Uri,System.String,System.Nullable{System.DateTimeOffset}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ISourceNode,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Refresh``1(``0) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ITypedElement,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Search(Hl7.Fhir.Rest.SearchParams,System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonConverterFactory.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Search(System.String,System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirJsonConverterFactory.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Search(System.String,System.String[],System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.BackwardsCompatible(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Search``1(Hl7.Fhir.Rest.SearchParams) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Custom(Hl7.Fhir.Introspection.ModelInspector,System.Predicate{Hl7.Fhir.Utility.CodedException},Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Search``1(System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Ostrich(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchById(System.String,System.String,System.String[],System.Nullable{System.Int32},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Recoverable(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchById(System.String,System.String,System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Strict(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchById``1(System.String,System.String[],System.Nullable{System.Int32},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXDocument(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchById``1(System.String,System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXDocument(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchByIdUsingPost(System.String,System.String,System.String[],System.Nullable{System.Int32},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXml(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchByIdUsingPost(System.String,System.String,System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXml(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchByIdUsingPost``1(System.String,System.String[],System.Nullable{System.Int32},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlAsync(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchByIdUsingPost``1(System.String,System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost(Hl7.Fhir.Rest.SearchParams,System.String) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlBytes(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost(System.String,System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlBytesAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost(System.String,System.String[],System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ISourceNode,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost``1(Hl7.Fhir.Rest.SearchParams) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ITypedElement,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost``1(System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ISourceNode,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.SearchUsingPost``1(System.String[],System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ITypedElement,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + M:Hl7.Fhir.Rest.BaseFhirClient.Transaction(Hl7.Fhir.Model.Bundle) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.SerializationEngineExtensions.SerializeReaderToJson(Hl7.Fhir.Serialization.IFhirSerializationEngine,System.Text.Json.Utf8JsonReader@) + M:Hl7.Fhir.Rest.BaseFhirClient.TypeHistory(System.String,System.Nullable{System.DateTimeOffset},System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.SerializationEngineExtensions.SerializeReaderToXml(Hl7.Fhir.Serialization.IFhirSerializationEngine,System.Xml.XmlReader) + M:Hl7.Fhir.Rest.BaseFhirClient.TypeHistory``1(System.Nullable{System.DateTimeOffset},System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true CP0002 - M:Hl7.Fhir.Serialization.SerializationFilter.ForElements(System.String[]) + M:Hl7.Fhir.Rest.BaseFhirClient.TypeOperation(System.String,System.String,Hl7.Fhir.Model.Parameters,System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.TypeOperation``1(System.String,Hl7.Fhir.Model.Parameters,System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.Update``1(``0,Hl7.Fhir.Rest.SearchParams,System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.Update``1(``0,System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.UpdateAsync``1(``0,Hl7.Fhir.Rest.SearchParams,System.Boolean,System.Nullable{System.Threading.CancellationToken}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemHistory(System.Nullable{System.DateTimeOffset},System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemOperation(System.String,Hl7.Fhir.Model.Parameters,System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemSearch(System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemSearch(System.String[],System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemSearchUsingPost(System.String[],System.String[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.String[]) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.BaseFhirClient.WholeSystemSearchUsingPost(System.String[],System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[],System.Nullable{System.Int32},System.Nullable{Hl7.Fhir.Rest.SummaryType},System.ValueTuple{System.String,Hl7.Fhir.Rest.IncludeModifier}[]) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.AddMeta(Hl7.Fhir.Rest.BaseFhirClient,System.String,Hl7.Fhir.Model.Meta) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.AddMeta(Hl7.Fhir.Rest.BaseFhirClient,System.Uri,Hl7.Fhir.Model.Meta) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.DeleteMeta(Hl7.Fhir.Rest.BaseFhirClient,System.String,Hl7.Fhir.Model.Meta) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.DeleteMeta(Hl7.Fhir.Rest.BaseFhirClient,System.Uri,Hl7.Fhir.Model.Meta) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.FetchPatientRecord(Hl7.Fhir.Rest.BaseFhirClient,System.Uri,Hl7.Fhir.Model.FhirDateTime,Hl7.Fhir.Model.FhirDateTime) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.Meta(Hl7.Fhir.Rest.BaseFhirClient,System.String) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.Meta(Hl7.Fhir.Rest.BaseFhirClient,System.Uri) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.Meta(Hl7.Fhir.Rest.BaseFhirClient) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.TranslateConcept(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.Code,Hl7.Fhir.Model.FhirUri,Hl7.Fhir.Model.FhirString,Hl7.Fhir.Model.FhirUri,Hl7.Fhir.Model.Coding,Hl7.Fhir.Model.CodeableConcept,Hl7.Fhir.Model.FhirUri,System.Collections.Generic.IEnumerable{Hl7.Fhir.Rest.FhirClientOperations.TranslateConceptDependency}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.TranslateConcept(Hl7.Fhir.Rest.BaseFhirClient,System.String,Hl7.Fhir.Model.Code,Hl7.Fhir.Model.FhirUri,Hl7.Fhir.Model.FhirString,Hl7.Fhir.Model.FhirUri,Hl7.Fhir.Model.Coding,Hl7.Fhir.Model.CodeableConcept,Hl7.Fhir.Model.FhirUri,System.Collections.Generic.IEnumerable{Hl7.Fhir.Rest.FhirClientOperations.TranslateConceptDependency}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.ValidateCreate(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.DomainResource,Hl7.Fhir.Model.FhirUri) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.ValidateDelete(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Rest.ResourceIdentity) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.ValidateResource(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.DomainResource,System.String,Hl7.Fhir.Model.FhirUri) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperations.ValidateUpdate(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.DomainResource,System.String,Hl7.Fhir.Model.FhirUri) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientSettings.get_CompressRequestBody + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientSettings.get_PreferredReturn + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientSettings.set_CompressRequestBody(System.Boolean) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientSettings.set_PreferredReturn(System.Nullable{Hl7.Fhir.Rest.Prefer}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.TransactionBuilder.Create(Hl7.Fhir.Model.Resource,Hl7.Fhir.Rest.SearchParams,System.String) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.TransactionBuilder.Delete(System.String,Hl7.Fhir.Rest.SearchParams,System.String) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.TransactionBuilder.Patch(System.String,Hl7.Fhir.Rest.SearchParams,Hl7.Fhir.Model.Parameters,System.String,System.String) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.TransactionBuilder.Update(Hl7.Fhir.Rest.SearchParams,Hl7.Fhir.Model.Resource,System.String,System.String) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoDeserializer.get_Settings + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.get_Release + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.get_Settings + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.Serialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},System.Text.Json.Utf8JsonWriter) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirJsonPocoSerializer.SerializeToString(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object}) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.get_Release + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.Serialize(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},System.Xml.XmlWriter,Hl7.Fhir.Serialization.SerializationFilter) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.BaseFhirXmlPocoSerializer.SerializeToString(System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object},Hl7.Fhir.Serialization.SerializationFilter) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJObject(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJObject(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJson(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJson(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonAsync(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonBytes(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.ToJsonBytesAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ISourceNode,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ITypedElement,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ISourceNode,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ITypedElement,Newtonsoft.Json.JsonWriter,Hl7.Fhir.Serialization.FhirJsonSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonConverterFactory.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonConverterFactory.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.BackwardsCompatible(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Custom(Hl7.Fhir.Introspection.ModelInspector,System.Predicate{Hl7.Fhir.Utility.CodedException},Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Ostrich(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Recoverable(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirSerializationEngineFactory.Strict(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXDocument(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXDocument(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXml(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXml(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlAsync(Hl7.Fhir.ElementModel.ISourceNode,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlBytes(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.ToXmlBytesAsync(Hl7.Fhir.ElementModel.ITypedElement,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ISourceNode,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteTo(Hl7.Fhir.ElementModel.ITypedElement,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ISourceNode,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlBuilderExtensions.WriteToAsync(Hl7.Fhir.ElementModel.ITypedElement,System.Xml.XmlWriter,Hl7.Fhir.Serialization.FhirXmlSerializationSettings) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.SerializationEngineExtensions.SerializeReaderToJson(Hl7.Fhir.Serialization.IFhirSerializationEngine,System.Text.Json.Utf8JsonReader@) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.SerializationEngineExtensions.SerializeReaderToXml(Hl7.Fhir.Serialization.IFhirSerializationEngine,System.Xml.XmlReader) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.SerializationFilter.ForElements(System.String[]) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorExtensions.RemoveAllConstrainedByDiffExtensions(Hl7.Fhir.Model.Element) + lib/net8.0/Hl7.Fhir.Base.dll + lib/net8.0/Hl7.Fhir.Base.dll + true + + + CP0002 + M:Hl7.Fhir.Specification.Snapshot.SnapshotGeneratorExtensions.RemoveAllConstrainedByDiffExtensions``1(System.Collections.Generic.IEnumerable{``0}) lib/net8.0/Hl7.Fhir.Base.dll lib/net8.0/Hl7.Fhir.Base.dll true diff --git a/src/Hl7.Fhir.Base/ElementModel/TypedElementParseExtensions.cs b/src/Hl7.Fhir.Base/ElementModel/TypedElementParseExtensions.cs index 442327d8d4..1feba63fa2 100644 --- a/src/Hl7.Fhir.Base/ElementModel/TypedElementParseExtensions.cs +++ b/src/Hl7.Fhir.Base/ElementModel/TypedElementParseExtensions.cs @@ -42,7 +42,7 @@ public static class TypedElementParseExtensions /// [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static Element? ParseBindableInternal(this ITypedElement instance) + internal static Element? ParseBindableInternal(this ITypedElement instance) { return instance.InstanceType switch { @@ -87,7 +87,7 @@ public static Quantity ParseQuantity(this ITypedElement instance) #pragma warning restore CS0618 // Type or member is obsolete [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static Quantity ParseQuantityInternal(this ITypedElement instance) + internal static Quantity ParseQuantityInternal(this ITypedElement instance) { var newQuantity = new Quantity { @@ -112,7 +112,7 @@ public static Quantity ParseQuantityInternal(this ITypedElement instance) #pragma warning restore CS0618 // Type or member is obsolete [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static T ParsePrimitiveInternal(this ITypedElement instance) where T : PrimitiveType, new() + internal static T ParsePrimitiveInternal(this ITypedElement instance) where T : PrimitiveType, new() => new() { ObjectValue = instance.Value }; #endregion @@ -125,7 +125,7 @@ public static Coding ParseCoding(this ITypedElement instance) [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static Coding ParseCodingInternal(this ITypedElement instance) + internal static Coding ParseCodingInternal(this ITypedElement instance) { return new Coding() { @@ -145,7 +145,7 @@ public static ResourceReference ParseResourceReference(this ITypedElement instan #pragma warning restore CS0618 // Type or member is obsolete [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static ResourceReference ParseResourceReferenceInternal(this ITypedElement instance) + internal static ResourceReference ParseResourceReferenceInternal(this ITypedElement instance) { return new ResourceReference() { @@ -162,7 +162,7 @@ public static CodeableConcept ParseCodeableConcept(this ITypedElement instance) #pragma warning restore CS0618 // Type or member is obsolete [Obsolete("WARNING! Intended for internal API usage exclusively")] - public static CodeableConcept ParseCodeableConceptInternal(this ITypedElement instance) + internal static CodeableConcept ParseCodeableConceptInternal(this ITypedElement instance) { return new CodeableConcept() { diff --git a/src/Hl7.Fhir.Base/FhirPath/Parser/Lexer.cs b/src/Hl7.Fhir.Base/FhirPath/Parser/Lexer.cs index 1af8201f22..565cca17e6 100644 --- a/src/Hl7.Fhir.Base/FhirPath/Parser/Lexer.cs +++ b/src/Hl7.Fhir.Base/FhirPath/Parser/Lexer.cs @@ -191,10 +191,6 @@ from fraction in Parse.Number from _ in Parse.Char('$') from name in Parse.String("this").XOr(Parse.String("index")).Or(Parse.String("total")).Text() select name; - - [Obsolete("This lexer is no longer used by the fhirpath parser as it processes the tokens correctly", false)] - public static readonly Parser Quantity = - Parse.Regex(P.Quantity.QUANTITYREGEX); } diff --git a/src/Hl7.Fhir.Base/Introspection/ClassMapping.cs b/src/Hl7.Fhir.Base/Introspection/ClassMapping.cs index 36af880864..f3222d739f 100644 --- a/src/Hl7.Fhir.Base/Introspection/ClassMapping.cs +++ b/src/Hl7.Fhir.Base/Introspection/ClassMapping.cs @@ -165,12 +165,6 @@ private ClassMapping(string name, Type nativeType, FhirRelease release) /// public Type? EnumType { get; private init; } - /// - /// Indicates whether this class represents the nested complex type for a backbone element. - /// - [Obsolete("These types are now generally called Backbone types, so use IsBackboneType instead.")] - public bool IsNestedType { get => IsBackboneType; set => IsBackboneType = value; } - /// /// Indicates whether this class represents the nested complex type for a backbone element. /// diff --git a/src/Hl7.Fhir.Base/Model/SearchParamDefinition.cs b/src/Hl7.Fhir.Base/Model/SearchParamDefinition.cs index efbab0db21..4335d72474 100644 --- a/src/Hl7.Fhir.Base/Model/SearchParamDefinition.cs +++ b/src/Hl7.Fhir.Base/Model/SearchParamDefinition.cs @@ -52,14 +52,6 @@ private string DebuggerDisplay public Markdown? Description { get; set; } public SearchParamType Type { get; set; } - /// - /// If this search parameter is a Composite, this array contains - /// the list of search parameters the param is a combination of - /// - [Obsolete("Use the property Component instead. " + - "Obsolete since 2023-05-16. Will be removed in the next major release.")] - public string[]? CompositeParams { get; set; } - /// /// One or more paths into the Resource instance that the search parameter /// uses diff --git a/src/Hl7.Fhir.Base/Rest/BaseFhirClient_obsolete.cs b/src/Hl7.Fhir.Base/Rest/BaseFhirClient_obsolete.cs deleted file mode 100644 index a0a81a9d6d..0000000000 --- a/src/Hl7.Fhir.Base/Rest/BaseFhirClient_obsolete.cs +++ /dev/null @@ -1,733 +0,0 @@ -#nullable enable - -using Hl7.Fhir.Model; -using Hl7.Fhir.Utility; -using System; -using System.Net; -using System.Threading; -using System.Threading.Tasks; - -namespace Hl7.Fhir.Rest; - -public partial class BaseFhirClient -{ - /// - /// Fetches a typed resource from a FHIR resource endpoint. - /// - /// The url of the Resource to fetch. This can be a Resource id url or a version-specific - /// Resource url. - /// The (weak) ETag to use in a conditional read. Optional. - /// Last modified since date in a conditional read. Optional. (refer to spec 2.1.0.5) If this is used, the client will throw an exception you need - /// The type of resource to read. Resource or DomainResource is allowed if exact type is unknown - /// - /// The requested resource. This operation will throw an exception - /// if the resource has been deleted or does not exist. - /// The specified may be relative or absolute, if it is an absolute - /// url, it must reference an address within the endpoint. - /// - /// Since ResourceLocation is a subclass of Uri, you may pass in ResourceLocations too. - /// This will occur if conditional request returns a status 304 and optionally an OperationOutcome - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Read(Uri location, string? ifNoneMatch = null, - DateTimeOffset? ifModifiedSince = null) where TResource : Resource - { - return ReadAsync(location, ifNoneMatch, ifModifiedSince).WaitResult(); - } - - /// - /// Fetches a typed resource from a FHIR resource endpoint. - /// - /// The url of the Resource to fetch as a string. This can be a Resource id url or a version-specific - /// Resource url. - /// The (weak) ETag to use in a conditional read. Optional. - /// Last modified since date in a conditional read. Optional. - /// The type of resource to read. Resource or DomainResource is allowed if exact type is unknown - /// The requested resource - /// This operation will throw an exception - /// if the resource has been deleted or does not exist. The specified may be relative or absolute, if it is an absolute - /// url, it must reference an address within the endpoint. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Read(string location, string? ifNoneMatch = null, - DateTimeOffset? ifModifiedSince = null) where TResource : Resource - { - return ReadAsync(location, ifNoneMatch, ifModifiedSince).WaitResult(); - } - - /// - /// Refreshes the data in the resource passed as an argument by re-reading it from the server - /// - /// - /// The resource for which you want to get the most recent version. - /// A new instance of the resource, containing the most up-to-date data - /// This function will not overwrite the argument with new data, rather it will return a new instance - /// which will have the newest data, leaving the argument intact. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Refresh(TResource current) where TResource : Resource - { - return RefreshAsync(current).WaitResult(); - } - - /// - /// Update (or create) a resource - /// - /// The resource to update - /// If true, asks the server to verify we are updating the latest version - /// The type of resource that is being updated - /// The body of the updated resource, unless ReturnFullResource is set to "false" - /// Throws an exception when the update failed, in particular when an update conflict is detected and the server returns a HTTP 409. - /// If the resource does not yet exist - and the server allows client-assigned id's - a new resource with the given id will be - /// created. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Update(TResource resource, bool versionAware = false) where TResource : Resource - { - return UpdateAsync(resource, versionAware).WaitResult(); - } - - /// - /// Conditionally update (or create) a resource - /// - /// The resource to update - /// Criteria used to locate the resource to update - /// If true, asks the server to verify we are updating the latest version - /// The type of resource that is being updated - /// The body of the updated resource, unless ReturnFullResource is set to "false" - /// Throws an exception when the update failed, in particular when an update conflict is detected and the server returns a HTTP 409. - /// If the criteria passed in condition do not match a resource a new resource with a server assigned id will be created. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Update(TResource resource, SearchParams condition, bool versionAware = false) - where TResource : Resource - { - return ConditionalUpdateAsync(resource, condition, versionAware).WaitResult(); - } - - /// - /// Conditionally update (or create) a resource - /// - /// The resource to update - /// Criteria used to locate the resource to update - /// If true, asks the server to verify we are updating the latest version - /// - /// The type of resource that is being updated - /// The body of the updated resource, unless ReturnFullResource is set to "false" - /// Throws an exception when the update failed, in particular when an update conflict is detected and the server returns a HTTP 409. - /// If the criteria passed in condition do not match a resource a new resource with a server assigned id will be created. - [Obsolete("This overload will be replaced by ConditionalUpdateAsync(). Using the new method is recommended")] - public virtual Task UpdateAsync(TResource resource, SearchParams condition, bool versionAware = false, CancellationToken? ct = null) where TResource : Resource - { - return ConditionalUpdateAsync(resource, condition, versionAware, ct); - } - - /// - /// Conditionally delete a resource - /// - /// The type of resource to delete - /// Criteria to use to match the resource to delete. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual void Delete(string resourceType, SearchParams condition) - { - DeleteAsync(resourceType, condition).WaitNoResult(); - } - - /// - /// Delete a resource at the given endpoint. - /// - /// endpoint of the resource to delete - /// Throws an exception when the delete failed, though this might - /// just mean the server returned 404 (the resource didn't exist before) or 410 (the resource was - /// already deleted). - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual void Delete(Uri location) - { - DeleteAsync(location).WaitNoResult(); - } - - /// - /// Delete a resource - /// - /// The resource to delete - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual void Delete(Resource resource) - { - DeleteAsync(resource).WaitNoResult(); - } - - /// - /// Delete a resource at the given endpoint. - /// - /// endpoint of the resource to delete - /// Throws an exception when the delete failed, though this might - /// just mean the server returned 404 (the resource didn't exist before) or 410 (the resource was - /// already deleted). - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual void Delete(string location) - { - DeleteAsync(location).WaitNoResult(); - } - - /// - /// Conditionally delete a resource - /// - /// The type of resource to delete - /// Criteria to use to match the resource to delete. - /// - [Obsolete("This overload will be replaced by ConditionalDeleteSingleAsync() and ConditionalDeleteMultipleAsync(). Using the new methods is recommended.")] - public virtual async Task DeleteAsync(string resourceType, SearchParams condition, CancellationToken? ct = null) - { - if (resourceType == null) throw Error.ArgumentNull(nameof(resourceType)); - if (condition == null) throw Error.ArgumentNull(nameof(condition)); - - var tx = new TransactionBuilder(Endpoint).ConditionalDeleteSingle(condition, resourceType).ToBundle(); - await executeAsync(tx, new[] { HttpStatusCode.OK, HttpStatusCode.NoContent }, ct).ConfigureAwait(false); - } - - /// - /// Create a resource on a FHIR endpoint - /// - /// The resource instance to create - /// The resource as created on the server, or an exception if the create failed. - /// The type of resource to create - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Create(TResource resource) where TResource : Resource - { - return CreateAsync(resource).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Create(TResource resource, SearchParams condition) where TResource : Resource - { - return ConditionalCreateAsync(resource, condition).WaitResult(); - } - - /// - /// Conditionally Create a resource on a FHIR endpoint - /// - /// The resource instance to create - /// The criteria - /// - /// The resource as created on the server, or an exception if the create failed. - /// The type of resource to create - [Obsolete("This overload will be replaced by ConditionalCreateAsync(). Using the new method is recommended")] - public virtual Task CreateAsync(TResource resource, SearchParams condition, CancellationToken? ct = null) where TResource : Resource - { - return ConditionalCreateAsync(resource, condition, ct); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? Patch(Uri location, Parameters patchParameters) - { - return PatchAsync(location, patchParameters).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Patch(string id, Parameters patchParameters, string? versionId = null) where TResource : Resource - { - return PatchAsync(id, patchParameters, versionId).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual TResource? Patch(SearchParams condition, Parameters patchParameters) where TResource : Resource - { - return ConditionalPatchAsync(condition, patchParameters).WaitResult(); - } - - /// - /// Conditionally patch a resource on a FHIR Endpoint - /// - /// Type of resource to patch - /// Criteria used to locate the resource to update - /// A Parameters resource that includes the patch operation(s) to perform - /// - /// The patched resource - [Obsolete("This overload will be replaced by ConditionalPatchAsync(). Using the new method is recommended")] - public Task PatchAsync(SearchParams condition, Parameters patchParameters, CancellationToken? ct = null) where TResource : Resource - { - return ConditionalPatchAsync(condition, patchParameters, ct); - } - - /// - /// Retrieve the version history for a specific resource type - /// - /// The type of Resource to get the history for - /// Optional. Returns only changes after the given date - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Asks the server to only provide the fields defined for the summary - /// A bundle with the history for the indicated instance, may contain both - /// ResourceEntries and DeletedEntries. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? TypeHistory(string resourceType, DateTimeOffset? since = null, int? pageSize = null, SummaryType? summary = null) - { - return TypeHistoryAsync(resourceType, since, pageSize, summary).WaitResult(); - } - - /// - /// Retrieve the version history for a specific resource type - /// - /// Optional. Returns only changes after the given date - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Asks the server to only provide the fields defined for the summary - /// The type of Resource to get the history for - /// A bundle with the history for the indicated instance, may contain both - /// ResourceEntries and DeletedEntries. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? TypeHistory(DateTimeOffset? since = null, int? pageSize = null, SummaryType? summary = null) where TResource : Resource, new() - { - return TypeHistoryAsync(since, pageSize, summary).WaitResult(); - } - - /// - /// Retrieve the version history for a resource at a given location - /// - /// The address of the resource to get the history for - /// Optional. Returns only changes after the given date - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Asks the server to only provide the fields defined for the summary - /// A bundle with the history for the indicated instance, may contain both - /// ResourceEntries and DeletedEntries. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? History(Uri location, DateTimeOffset? since = null, int? pageSize = null, SummaryType? summary = null) - { - return HistoryAsync(location, since, pageSize, summary).WaitResult(); - } - - /// - /// Retrieve the version history for a resource at a given location - /// - /// The address of the resource to get the history for - /// Optional. Returns only changes after the given date - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Asks the server to only provide the fields defined for the summary - /// A bundle with the history for the indicated instance, may contain both - /// ResourceEntries and DeletedEntries. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? History(string location, DateTimeOffset? since = null, int? pageSize = null, SummaryType? summary = null) - { - return HistoryAsync(location, since, pageSize, summary).WaitResult(); - } - - /// - /// Retrieve the full version history of the server - /// - /// Optional. Returns only changes after the given date - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Indicates whether the returned resources should just contain the minimal set of elements - /// A bundle with the history for the indicated instance, may contain both - /// ResourceEntries and DeletedEntries. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? WholeSystemHistory(DateTimeOffset? since = null, int? pageSize = null, SummaryType? summary = null) - { - return WholeSystemHistoryAsync(since, pageSize, summary).WaitResult(); - } - - /// - /// Send a set of creates, updates and deletes to the server to be processed in one transaction - /// - /// The bundled creates, updates and deleted - /// A bundle as returned by the server after it has processed the transaction, or - /// a FhirOperationException will be thrown if an error occurred. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public Bundle? Transaction(Bundle bundle) - { - return TransactionAsync(bundle).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? WholeSystemOperation(string operationName, Parameters? parameters = null, bool useGet = false) - { - return WholeSystemOperationAsync(operationName, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? TypeOperation(string operationName, Parameters? parameters = null, - bool useGet = false) where TResource : Resource - { - return TypeOperationAsync(operationName, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? TypeOperation(string operationName, string typeName, Parameters? parameters = null, bool useGet = false) - { - return TypeOperationAsync(operationName, typeName, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? InstanceOperation(Uri location, string operationName, Parameters? parameters = null, bool useGet = false) - { - return InstanceOperationAsync(location, operationName, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? Operation(Uri location, string operationName, Parameters? parameters = null, bool useGet = false) - { - return OperationAsync(location, operationName, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? Operation(Uri operation, Parameters? parameters = null, bool useGet = false) - { - return OperationAsync(operation, parameters, useGet).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? ProcessMessage(Bundle messageBundle, bool async = false, string? responseUrl = null) - { - return ProcessMessageAsync(messageBundle, async, responseUrl).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - private Resource? internalOperation(string operationName, string? type = null, string? id = null, - string? vid = null, Parameters? parameters = null, bool useGet = false) => - internalOperationAsync(operationName, type, id, vid, parameters, useGet).WaitResult(); - - /// - /// Invoke a general GET on the server. If the operation fails, then this method will throw an exception - /// - /// A relative or absolute url. If the url is absolute, it has to be located within the endpoint of the client. - /// A resource that is the outcome of the operation. The type depends on the definition of the operation at the given url - /// parameters to the method are simple, and are in the URL, and this is a GET operation - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? Get(Uri url) - { - return GetAsync(url).WaitResult(); - } - - /// - /// Invoke a general GET on the server. If the operation fails, then this method will throw an exception - /// - /// A relative or absolute url. If the url is absolute, it has to be located within the endpoint of the client. - /// A resource that is the outcome of the operation. The type depends on the definition of the operation at the given url - /// parameters to the method are simple, and are in the URL, and this is a GET operation - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Resource? Get(string url) - { - return GetAsync(url).WaitResult(); - } - - /// - /// Search for Resources based on criteria specified in a Query resource - /// - /// The Query resource containing the search parameters - /// The type of resource to filter on (optional). If not specified, will search on all resource types. - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Search(SearchParams q, string? resourceType = null) - { - return SearchAsync(q, resourceType).WaitResult(); - } - - /// - /// Search for Resources based on criteria specified in a Query resource - /// - /// The Query resource containing the search parameters - /// The type of resource to filter on (optional). If not specified, will search on all resource types. - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(SearchParams q, string? resourceType = null) - { - return SearchUsingPostAsync(q, resourceType).WaitResult(); - } - - /// - /// Search for Resources based on criteria specified in a Query resource - /// - /// The Query resource containing the search parameters - /// The type of resource to filter on - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Search(SearchParams q) where TResource : Resource - { - return SearchAsync(q).WaitResult(); - } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(SearchParams q) where TResource : Resource - { - return SearchUsingPostAsync(q, Inspector.GetFhirTypeNameForType(typeof(TResource))).WaitResult(); - } - - /// - /// Search for Resources of a certain type that match the given criteria - /// - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// The type of resource to list - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Search(string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - where TResource : Resource, new() - { - return SearchAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for Resources of a certain type that match the given criteria - /// - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// The type of resource to list - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - where TResource : Resource, new() - { - return SearchUsingPostAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(string[] criteria, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - SummaryType? summary, (string path, IncludeModifier modifier)[]? revIncludes) - where TResource : Resource, new() - { - return SearchUsingPostAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for Resources of a certain type that match the given criteria - /// - /// The type of resource to search for - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Search(string resource, string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - { - return SearchAsync(resource, criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Search(string resource, string[] criteria, (string path, IncludeModifier modifier)[] includes, int? pageSize, - SummaryType? summary, (string path, IncludeModifier modifier)[] revIncludes) - { - return SearchAsync(resource, criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for Resources of a certain type that match the given criteria - /// - /// The type of resource to search for - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(string resource, string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - { - return SearchUsingPostAsync(resource, criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchUsingPost(string resource, string[]? criteria, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - SummaryType? summary, (string path, IncludeModifier modifier)[]? revIncludes) - { - return SearchUsingPostAsync(resource, criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for Resources across the whole server that match the given criteria - /// - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? WholeSystemSearch(string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - { - return WholeSystemSearchAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? WholeSystemSearch(string[]? criteria, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - SummaryType? summary, (string path, IncludeModifier modifier)[]? revIncludes) - { - return WholeSystemSearchAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for Resources across the whole server that match the given criteria - /// - /// Optional. The search parameters to filter the resources on. Each - /// given string is a combined key/value pair (separated by '=') - /// Optional. A list of include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. Whether to include only return a summary of the resources in the Bundle - /// Optional. A list of reverse include paths - /// A Bundle with all resources found by the search, or an empty Bundle if none were found. - /// All parameters are optional, leaving all parameters empty will return an unfiltered list - /// of all resources of the given Resource type - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? WholeSystemSearchUsingPost(string[]? criteria = null, string[]? includes = null, int? pageSize = null, - SummaryType? summary = null, string[]? revIncludes = null) - { - return WholeSystemSearchUsingPostAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? WholeSystemSearchUsingPost(string[]? criteria, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - SummaryType? summary, (string path, IncludeModifier modifier)[]? revIncludes) - { - return WholeSystemSearchUsingPostAsync(criteria, includes, pageSize, summary, revIncludes).WaitResult(); - } - - /// - /// Search for resources based on a resource's id. - /// - /// The id of the resource to search for - /// Zero or more include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. A list of reverse include paths - /// The type of resource to search for - /// A Bundle with the BundleEntry as identified by the id parameter or an empty - /// Bundle if the resource wasn't found. - /// This operation is similar to Read, but additionally, - /// it is possible to specify include parameters to include resources in the bundle that the - /// returned resource refers to. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchById(string id, string[]? includes = null, int? pageSize = null, string[]? revIncludes = null) where TResource : Resource, new() - { - return SearchByIdAsync(id, includes, pageSize, revIncludes).WaitResult(); - } - - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchById(string id, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - (string path, IncludeModifier modifier)[]? revIncludes) where TResource : Resource, new() - { - return SearchByIdAsync(id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - /// Search for resources based on a resource's id. - /// - /// The id of the resource to search for - /// Zero or more include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. A list of reverse include paths - /// The type of resource to search for - /// A Bundle with the BundleEntry as identified by the id parameter or an empty - /// Bundle if the resource wasn't found. - /// This operation is similar to Read, but additionally, - /// it is possible to specify include parameters to include resources in the bundle that the - /// returned resource refers to. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchByIdUsingPost(string id, string[]? includes = null, int? pageSize = null, string[]? revIncludes = null) where TResource : Resource, new() - { - return SearchByIdUsingPostAsync(id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchByIdUsingPost(string id, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - (string path, IncludeModifier modifier)[] revIncludes) where TResource : Resource, new() - { - return SearchByIdUsingPostAsync(id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - /// Search for resources based on a resource's id. - /// - /// The type of resource to search for - /// The id of the resource to search for - /// Zero or more include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. A list of reverse include paths - /// A Bundle with the BundleEntry as identified by the id parameter or an empty - /// Bundle if the resource wasn't found. - /// This operation is similar to Read, but additionally, - /// it is possible to specify include parameters to include resources in the bundle that the - /// returned resource refers to. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchById(string resource, string id, string[]? includes = null, int? pageSize = null, string[]? revIncludes = null) - { - return SearchByIdAsync(resource, id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchById(string resource, string id, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - (string path, IncludeModifier modifier)[]? revIncludes) - { - return SearchByIdAsync(resource, id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - /// Search for resources based on a resource's id. - /// - /// The type of resource to search for - /// The id of the resource to search for - /// Zero or more include paths - /// Optional. Asks server to limit the number of entries per page returned - /// Optional. A list of reverse include paths - /// A Bundle with the BundleEntry as identified by the id parameter or an empty - /// Bundle if the resource wasn't found. - /// This operation is similar to Read, but additionally, - /// it is possible to specify include parameters to include resources in the bundle that the - /// returned resource refers to. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchByIdUsingPost(string resource, string id, string[]? includes = null, int? pageSize = null, string[]? revIncludes = null) - { - return SearchByIdUsingPostAsync(resource, id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? SearchByIdUsingPost(string resource, string id, (string path, IncludeModifier modifier)[]? includes, int? pageSize, - (string path, IncludeModifier modifier)[]? revIncludes) - { - return SearchByIdUsingPostAsync(resource, id, includes, pageSize, revIncludes).WaitResult(); - } - - /// - /// Uses the FHIR paging mechanism to go navigate around a series of paged result Bundles - /// - /// The bundle as received from the last response - /// Optional. Direction to browse to, default is the next page of results. - /// A bundle containing a new page of results based on the browse direction, or null if - /// the server did not have more results in that direction. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public virtual Bundle? Continue(Bundle current, PageDirection direction = PageDirection.Next) - { - return ContinueAsync(current, direction).WaitResult(); - } -} \ No newline at end of file diff --git a/src/Hl7.Fhir.Base/Rest/ContentType.cs b/src/Hl7.Fhir.Base/Rest/ContentType.cs index 0cc1699114..2c8ff1b89c 100644 --- a/src/Hl7.Fhir.Base/Rest/ContentType.cs +++ b/src/Hl7.Fhir.Base/Rest/ContentType.cs @@ -52,9 +52,6 @@ public static class ContentType public const string VERSION_CONTENT_HEADER_NAME = "fhirVersion"; - [Obsolete("Use VERSION_CONTENT_HEADER_NAME instead.")] - public const string VERSION_CONTENT_HEADER = "fhirVersion="; - public static string DecompressionMethodHeaderValue(DecompressionMethods method) => method.ToString().ToLowerInvariant(); diff --git a/src/Hl7.Fhir.Base/Rest/FhirClientOperations.cs b/src/Hl7.Fhir.Base/Rest/FhirClientOperations.cs index 39d85e8aad..407eabded1 100644 --- a/src/Hl7.Fhir.Base/Rest/FhirClientOperations.cs +++ b/src/Hl7.Fhir.Base/Rest/FhirClientOperations.cs @@ -119,13 +119,6 @@ public static async Task ValidateCreateAsync(this BaseFhirClie return OperationResult(await client.TypeOperationAsync(RestOperation.VALIDATE_RESOURCE, resource.TypeName, par, ct:ct).ConfigureAwait(false)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static OperationOutcome ValidateCreate(this BaseFhirClient client, DomainResource resource, - FhirUri profile = null) - { - return ValidateCreateAsync(client, resource, profile).WaitResult(); - } - public static async Task ValidateUpdateAsync(this BaseFhirClient client, DomainResource resource, string id, FhirUri profile = null, CancellationToken? ct = null) { if (id == null) throw Error.ArgumentNull(nameof(id)); @@ -138,13 +131,6 @@ public static async Task ValidateUpdateAsync(this BaseFhirClie return OperationResult(await client.InstanceOperationAsync(loc, RestOperation.VALIDATE_RESOURCE, par, ct:ct).ConfigureAwait(false)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static OperationOutcome ValidateUpdate(this BaseFhirClient client, DomainResource resource, string id, - FhirUri profile = null) - { - return ValidateUpdateAsync(client, resource, id, profile).WaitResult(); - } - public static async Task ValidateDeleteAsync(this BaseFhirClient client, ResourceIdentity location, CancellationToken? ct = null) { if (location == null) throw Error.ArgumentNull(nameof(location)); @@ -154,12 +140,6 @@ public static async Task ValidateDeleteAsync(this BaseFhirClie return OperationResult(await client.InstanceOperationAsync(location.WithoutVersion().MakeRelative(), RestOperation.VALIDATE_RESOURCE, par, ct: ct).ConfigureAwait(false)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static OperationOutcome ValidateDelete(this BaseFhirClient client, ResourceIdentity location) - { - return ValidateDeleteAsync(client, location).WaitResult(); - } - public static async Task ValidateResourceAsync(this BaseFhirClient client, DomainResource resource, string id = null, FhirUri profile = null, CancellationToken? ct = null) { if (resource == null) throw Error.ArgumentNull(nameof(resource)); @@ -178,13 +158,6 @@ public static async Task ValidateResourceAsync(this BaseFhirCl } } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static OperationOutcome ValidateResource(this BaseFhirClient client, DomainResource resource, - string id = null, FhirUri profile = null) - { - return ValidateResourceAsync(client, resource, id, profile).WaitResult(); - } - #endregion #region Fetch @@ -198,23 +171,16 @@ public static async Task FetchPatientRecordAsync(this BaseFhirClient cli Resource result; if (patient == null) - result = await client.TypeOperationAsync(RestOperation.FETCH_PATIENT_RECORD, FhirTypeNames.PATIENT_NAME, par, ct:ct).ConfigureAwait(false); + result = await client.TypeOperationAsync(RestOperation.FETCH_PATIENT_RECORD, FhirTypeNames.PATIENT_NAME, par, ct: ct).ConfigureAwait(false); else { var location = new ResourceIdentity(patient); - result = await client.InstanceOperationAsync(location.WithoutVersion().MakeRelative(), RestOperation.FETCH_PATIENT_RECORD, par, ct:ct).ConfigureAwait(false); + result = await client.InstanceOperationAsync(location.WithoutVersion().MakeRelative(), RestOperation.FETCH_PATIENT_RECORD, par, ct: ct).ConfigureAwait(false); } return OperationResult(result); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Bundle FetchPatientRecord(this BaseFhirClient client, Uri patient = null, FhirDateTime start = null, - FhirDateTime end = null) - { - return FetchPatientRecordAsync(client, patient, start, end).WaitResult(); - } - #endregion #region Meta @@ -225,12 +191,6 @@ public static async Task MetaAsync(this BaseFhirClient client, Cancellatio return ExtractMeta(OperationResult(await client.WholeSystemOperationAsync(RestOperation.META, useGet: true, ct:ct).ConfigureAwait(false))); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta Meta(this BaseFhirClient client) - { - return MetaAsync(client).WaitResult(); - } - //[base]/Resource/id/$meta/[_history/vid] public static async Task MetaAsync(this BaseFhirClient client, Uri location, CancellationToken? ct = null) { @@ -240,70 +200,33 @@ public static async Task MetaAsync(this BaseFhirClient client, Uri locatio return ExtractMeta(OperationResult(result)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta Meta(this BaseFhirClient client, Uri location) - { - return MetaAsync(client, location).WaitResult(); - } - public static Task MetaAsync(this BaseFhirClient client, string location, CancellationToken? ct = null) { return MetaAsync(client, new Uri(location, UriKind.RelativeOrAbsolute), ct); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta Meta(this BaseFhirClient client, string location) - { - return MetaAsync(client, location).WaitResult(); - } - public static async Task AddMetaAsync(this BaseFhirClient client, Uri location, Meta meta, CancellationToken? ct = null) { var par = new Parameters().Add("meta", meta); return ExtractMeta(OperationResult(await client.InstanceOperationAsync(location, RestOperation.META_ADD, par, ct:ct).ConfigureAwait(false))); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta AddMeta(this BaseFhirClient client, Uri location, Meta meta) - { - return AddMetaAsync(client, location, meta).WaitResult(); - } - public static Task AddMetaAsync(this BaseFhirClient client, string location, Meta meta, CancellationToken? ct = null) { return AddMetaAsync(client, new Uri(location, UriKind.RelativeOrAbsolute), meta, ct); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta AddMeta(this BaseFhirClient client, string location, Meta meta) - { - return AddMetaAsync(client, location, meta).WaitResult(); - } - - public static async Task DeleteMetaAsync(this BaseFhirClient client, Uri location, Meta meta, CancellationToken? ct = null) { var par = new Parameters().Add("meta", meta); return ExtractMeta(OperationResult(await client.InstanceOperationAsync(location, RestOperation.META_DELETE, par, ct:ct).ConfigureAwait(false))); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta DeleteMeta(this BaseFhirClient client, Uri location, Meta meta) - { - return DeleteMetaAsync(client, location, meta).WaitResult(); - } - public static Task DeleteMetaAsync(this BaseFhirClient client, string location, Meta meta, CancellationToken? ct = null) { return DeleteMetaAsync(client, new Uri(location, UriKind.RelativeOrAbsolute), meta, ct); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta DeleteMeta(this BaseFhirClient client, string location, Meta meta) - { - return DeleteMetaAsync(client, location, meta).WaitResult(); - } - #endregion #region Translate @@ -324,17 +247,6 @@ public static async Task TranslateConceptAsync(this BaseFhirClient c return OperationResult(await client.InstanceOperationAsync(loc, RestOperation.TRANSLATE, par, ct:ct).ConfigureAwait(false)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Parameters TranslateConcept(this BaseFhirClient client, string id, Code code, FhirUri system, - FhirString version, - FhirUri valueSet, Coding coding, CodeableConcept codeableConcept, FhirUri target, - IEnumerable dependencies) - { - return TranslateConceptAsync(client, id, code, system, version, valueSet, coding, codeableConcept, target, - dependencies).WaitResult(); - } - - public static async Task TranslateConceptAsync(this BaseFhirClient client, Code code, FhirUri system, FhirString version, FhirUri valueSet, Coding coding, CodeableConcept codeableConcept, FhirUri target, IEnumerable dependencies, CancellationToken? ct = null) { @@ -343,15 +255,6 @@ public static async Task TranslateConceptAsync(this BaseFhirClient c return OperationResult(await client.TypeOperationAsync(RestOperation.TRANSLATE, FhirTypeNames.CONCEPTMAP_NAME, par, ct:ct).ConfigureAwait(false)); } - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Parameters TranslateConcept(this BaseFhirClient client, Code code, FhirUri system, FhirString version, - FhirUri valueSet, Coding coding, CodeableConcept codeableConcept, FhirUri target, - IEnumerable dependencies) - { - return TranslateConceptAsync(client, code, system, version, valueSet, coding, codeableConcept, target, - dependencies).WaitResult(); - } - #endregion #region Private diff --git a/src/Hl7.Fhir.Base/Rest/FhirClientSettings.cs b/src/Hl7.Fhir.Base/Rest/FhirClientSettings.cs index 6f3d5423fd..a7d2cddca9 100644 --- a/src/Hl7.Fhir.Base/Rest/FhirClientSettings.cs +++ b/src/Hl7.Fhir.Base/Rest/FhirClientSettings.cs @@ -51,29 +51,6 @@ public class FhirClientSettings /// public int Timeout = 100 * 1000; - /// - [Obsolete("Use ReturnPreference and/or set UseAsync instead.")] - public Prefer? PreferredReturn - { - get => UseAsync ? Prefer.RespondAsync : (Prefer?)ReturnPreference; - set - { - switch (value) - { - case Prefer.RespondAsync: - UseAsync = true; - break; - case null: - UseAsync = false; - ReturnPreference = null; - break; - default: - ReturnPreference = (ReturnPreference)value; - break; - } - } - } - /// /// Should calls to Create, Update and transaction operations return the whole updated content, /// minimal content or an OperationOutcome (see https://hl7.org/fhir/http.html#return). @@ -99,17 +76,6 @@ public Prefer? PreferredReturn /// public bool PreferCompressedResponses; - /// - /// Compress any Request bodies using GZip. - /// - /// If a server does not handle compressed requests using GZip, it will return a 415 response. - [Obsolete("Use RequestBodyCompressionMethod instead.")] - public bool CompressRequestBody - { - get => RequestBodyCompressionMethod is not DecompressionMethods.None; - set => RequestBodyCompressionMethod = value ? DecompressionMethods.GZip : DecompressionMethods.None; - } - /// /// Compress request bodies using the selected method. Note: only and /// are currently supported. diff --git a/src/Hl7.Fhir.Base/Rest/HttpUtil.cs b/src/Hl7.Fhir.Base/Rest/HttpUtil.cs index d51ef4f360..592698a3b6 100644 --- a/src/Hl7.Fhir.Base/Rest/HttpUtil.cs +++ b/src/Hl7.Fhir.Base/Rest/HttpUtil.cs @@ -233,37 +233,6 @@ public enum SearchParameterHandling Lenient } - [Obsolete("Use ReturnPreference and/or set UseAsync instead.")] - public enum Prefer - { - /// - /// Prefer to receive the full resource in the body after completion of the interaction - /// - [EnumLiteral("representation")] - ReturnRepresentation, - - /// - /// Prefer to not a receive a body after completion of the interaction - /// - [EnumLiteral("minimal")] - ReturnMinimal, - - /// - /// Prefer to receive an OperationOutcome resource containing hints and warnings about the - /// operation rather than the full resource - /// - [EnumLiteral("OperationOutcome")] - OperationOutcome, - - /// - /// Prefer to run the operation as an asynchronous request - /// (http://hl7.org/fhir/r4/async.html) - /// - This may also be applicable in prior versions (though not part of that stamdard) - /// - [EnumLiteral("respond-async")] - RespondAsync - } - public enum ReturnPreference { /// diff --git a/src/Hl7.Fhir.Base/Rest/TransactionBuilder_obsolete.cs b/src/Hl7.Fhir.Base/Rest/TransactionBuilder_obsolete.cs deleted file mode 100644 index 7038a7eaca..0000000000 --- a/src/Hl7.Fhir.Base/Rest/TransactionBuilder_obsolete.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2014, Firely (info@fire.ly) and contributors - * See the file CONTRIBUTORS for details. - * - * This file is licensed under the BSD 3-Clause license - * available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE - */ - -#nullable enable - -using Hl7.Fhir.Model; -using System; - -namespace Hl7.Fhir.Rest; - -/// -/// Builder to describe a FHIR transaction Bundle -/// -public partial class TransactionBuilder -{ - /// - /// Add a "conditional update" entry to the transaction/batch - /// - /// conditions on which a resource is supposed to be updated or not - /// the new version of the resource to be updated - /// optional version id of the resource - /// Optional parameter to set the fullUrl of the Bundle entry. - /// - [Obsolete("This overload will be replaced by ConditionalUpdate(). Using the new method is recommended")] - public TransactionBuilder Update(SearchParams condition, Resource body, string? versionId = null, string? bundleEntryFullUrl = null) - { - return ConditionalUpdate(condition, body, versionId, bundleEntryFullUrl); - } - - /// - /// Add a "conditional patch" entry to the transaction/batch - /// - /// type of the resource to be patched - /// conditions on which the a resource is supposed to be patched - /// parameters resource that describes the patch operation - /// optional version id of the resource - /// Optional parameter to set the fullUrl of the Bundle entry. - /// - [Obsolete("This overload will be replaced by ConditionalPatch(). Using the new method is recommended")] - public TransactionBuilder Patch(string resourceType, SearchParams condition, Parameters body, string? versionId = null, string? bundleEntryFullUrl = null) - { - return ConditionalPatch(resourceType, condition, body, versionId, bundleEntryFullUrl); - } - - /// - /// Add a "conditional delete" entry to the transaction/batch - /// - /// type of the resource to be deleted - /// conditions on which the resource should be deleted - /// Optional parameter to set the fullUrl of the Bundle entry. - /// - [Obsolete("This overload will be replaced by ConditionalDeleteSingle() and ConditionalDeleteMultiple(). Using the new methods is recommended")] - public TransactionBuilder Delete(string resourceType, SearchParams condition, string? bundleEntryFullUrl = null) - { - return ConditionalDeleteSingle(condition, resourceType, bundleEntryFullUrl); - } - - /// - /// Add a "conditional create" entry to the transaction/batch - /// - /// the resource that is to be created - /// conditions on which the resource is supposed to be created - /// Optional parameter to set the fullUrl of the Bundle entry. - /// - [Obsolete("This overload will be replaced by ConditionalCreate(). Using the new method is recommended")] - public TransactionBuilder Create(Resource body, SearchParams condition, string? bundleEntryFullUrl = null) - { - return ConditionalCreate(body, condition, bundleEntryFullUrl); - } -} -#nullable restore \ No newline at end of file diff --git a/src/Hl7.Fhir.Base/Serialization/FhirXmlException.cs b/src/Hl7.Fhir.Base/Serialization/FhirXmlException.cs index 601386a848..3db148e673 100644 --- a/src/Hl7.Fhir.Base/Serialization/FhirXmlException.cs +++ b/src/Hl7.Fhir.Base/Serialization/FhirXmlException.cs @@ -30,8 +30,6 @@ public class FhirXmlException : ExtendedCodedException public const string ELEMENT_NOT_IN_SEQUENCE_CODE = "XML116"; public const string SCHEMALOCATION_DISALLOWED_CODE = "XML117"; public const string EXPECTED_OPENING_ELEMENT_CODE = "XML118"; - [Obsolete("This name contains a spelling mistake, use ENCOUNTERED_DTD_REFERENCES_CODE instead.")] - public const string ENCOUNTERED_DTP_REFERENCES_CODE = "XML119"; public const string ENCOUNTERED_DTD_REFERENCES_CODE = "XML119"; public const string ELEMENT_HAS_NO_VALUE_OR_CHILDREN_CODE = "XML120"; public const string INVALID_DUPLICATE_PROPERTY_CODE = "XML121"; diff --git a/src/Hl7.Fhir.Base/Specification/Snapshot/SnapshotGeneratorExtensions.cs b/src/Hl7.Fhir.Base/Specification/Snapshot/SnapshotGeneratorExtensions.cs index 4116067f1a..3e87fb49f7 100644 --- a/src/Hl7.Fhir.Base/Specification/Snapshot/SnapshotGeneratorExtensions.cs +++ b/src/Hl7.Fhir.Base/Specification/Snapshot/SnapshotGeneratorExtensions.cs @@ -53,29 +53,6 @@ public static void RemoveConstrainedByDiffExtension(this IExtendable element) element.RemoveExtension(CONSTRAINED_BY_DIFF_EXT); } - /// Recursively removes all instances of the extension from the specified element definition and all it's child objects. - [Obsolete("Use RemoveAllNonInheritableExtensions(this Element element) instead.")] - public static void RemoveAllConstrainedByDiffExtensions(this Element element) - { - if (element == null) { throw Error.ArgumentNull(nameof(element)); } - element.RemoveConstrainedByDiffExtension(); - foreach (var child in element.Children().OfType()) - { - child.RemoveAllConstrainedByDiffExtensions(); - } - } - - /// Recursively removes all instances of the extension from all the elements and their respective child objects. - [Obsolete("Use RemoveAllNonInheritableExtensions(this IEnumerable elements) instead.")] - public static void RemoveAllConstrainedByDiffExtensions(this IEnumerable elements) where T : Element - { - if (elements == null) { throw Error.ArgumentNull(nameof(elements)); } - foreach (var elem in elements) - { - elem.RemoveAllConstrainedByDiffExtensions(); - } - } - /// /// This extension removes all non-inheritable extensions from the specified element definition and all it's child objects. /// Non-inheritable extensions are extensions that should not be inherited by derived profiles. @@ -122,47 +99,5 @@ internal static void RemoveNonInheritableExtensions(this IExtendable element) ResourceIdentity.CORE_BASE_URL + "resource-lastReviewDate", CONSTRAINED_BY_DIFF_EXT //this is our own extension to define differences compared to the base, this can't be inherited from the base profile ]; - - // ========== For internal use only ========== - // [WMR 20170209] OBSOLETE -#if false - - /// Removes a specific extension from the snapshot element definition and it's descendant elements, recursively. - /// An instance. - /// The canonical url of the extension. - static void ClearAllExtensions(this ElementDefinition elemDef, string uri) - { - if (elemDef != null) - { - ClearExtensions(elemDef, uri); - } - } - - static void ClearExtensions(this IEnumerable elements, string uri) where T : Base - { - if (elements != null) - { - foreach (var child in elements) - { - ClearExtensions(child, uri); - } - } - } - - static void ClearExtensions(this T element, string uri) where T : Base - { - if (element != null) - { - ClearExtension(element as IExtendable, uri); - ClearExtensions(element.Children, uri); - } - } - - static void ClearExtension(this IExtendable extendable, string uri) - { - extendable?.RemoveExtension(uri); - } -#endif - } } \ No newline at end of file diff --git a/src/Hl7.Fhir.Base/Validation/ValidateEnumCodeAttribute.cs b/src/Hl7.Fhir.Base/Validation/ValidateEnumCodeAttribute.cs deleted file mode 100644 index c39e591768..0000000000 --- a/src/Hl7.Fhir.Base/Validation/ValidateEnumCodeAttribute.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, Firely (info@fire.ly) and contributors - * See the file CONTRIBUTORS for details. - * - * This file is licensed under the BSD 3-Clause license - * available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE - */ - -using Hl7.Fhir.Model; -using System; -using System.ComponentModel.DataAnnotations; -using COVE = Hl7.Fhir.Validation.CodedValidationException; - -#nullable enable - -namespace Hl7.Fhir.Validation -{ - /// - /// Validates a code value against the FHIR rules for code. - /// - [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)] - [Obsolete("This is a duplicate of CodePatternAttribute and should not be used anymore.")] - public class ValidateEnumCodeAttribute : ValidationAttribute - { - /// - protected override ValidationResult? IsValid(object? value, ValidationContext validationContext) => - value switch - { - null => ValidationResult.Success, - string s when Code.IsValidValue(s) => ValidationResult.Success, - string s => COVE.CODE_LITERAL_INVALID(validationContext, s).AsResult(validationContext), - _ => throw new ArgumentException($"{nameof(CodePatternAttribute)} attributes can only be applied to string properties.") - }; - } -} - -#nullable restore \ No newline at end of file diff --git a/src/Hl7.Fhir.Conformance/CompatibilitySuppressions.xml b/src/Hl7.Fhir.Conformance/CompatibilitySuppressions.xml index 07eadf5988..2a9216c639 100644 --- a/src/Hl7.Fhir.Conformance/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.Conformance/CompatibilitySuppressions.xml @@ -29,6 +29,13 @@ lib/net8.0/Hl7.Fhir.Conformance.dll true + + CP0002 + M:Hl7.Fhir.Model.ElementDefinition.get_Name + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + CP0002 M:Hl7.Fhir.Model.ElementDefinition.MappingComponent.get_CommentElement @@ -36,6 +43,41 @@ lib/net8.0/Hl7.Fhir.Conformance.dll true + + CP0002 + M:Hl7.Fhir.Model.ElementDefinition.set_Name(System.String) + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + + + CP0002 + M:Hl7.Fhir.Model.ValueSet.get_Define + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + + + CP0002 + M:Hl7.Fhir.Model.ValueSet.set_Define(System.String) + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + + + CP0002 + M:Hl7.Fhir.Specification.Summary.ArtifactSummaryGenerator.get_Default + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + + + CP0002 + M:Hl7.Fhir.Specification.Terminology.ValueSetExpander.Expand(Hl7.Fhir.Model.ValueSet) + lib/net8.0/Hl7.Fhir.Conformance.dll + lib/net8.0/Hl7.Fhir.Conformance.dll + true + CP0008 T:Hl7.Fhir.Model.IElementList diff --git a/src/Hl7.Fhir.Conformance/Model/ElementDefinition.cs b/src/Hl7.Fhir.Conformance/Model/ElementDefinition.cs index 885a98ec62..49e49eca6d 100644 --- a/src/Hl7.Fhir.Conformance/Model/ElementDefinition.cs +++ b/src/Hl7.Fhir.Conformance/Model/ElementDefinition.cs @@ -49,18 +49,6 @@ string DebuggerDisplay } } - [NotMapped] - [IgnoreDataMemberAttribute] - [Obsolete("Property was renamed to SliceName", true)] - public string Name - { - get { return SliceName; } - set - { - SliceName = value; - } - } - // http://blogs.msdn.com/b/jaredpar/archive/2011/03/18/debuggerdisplay-attribute-best-practices.aspx [DebuggerDisplay(@"\{{DebuggerDisplay,nq}}")] public partial class DiscriminatorComponent diff --git a/src/Hl7.Fhir.Conformance/Model/ValueSet.cs b/src/Hl7.Fhir.Conformance/Model/ValueSet.cs index f57a65b1b5..aff9f0319a 100644 --- a/src/Hl7.Fhir.Conformance/Model/ValueSet.cs +++ b/src/Hl7.Fhir.Conformance/Model/ValueSet.cs @@ -18,9 +18,6 @@ namespace Hl7.Fhir.Model { public partial class ValueSet : Hl7.Fhir.Model.DomainResource { - [Obsolete("This property was renamed in DSTU2 to CodeSystem, and in DSTU3 out of the class entirely to the CodeSystem resource", true)] - public string? Define { get; set; } - public bool HasExpansion => Expansion != null; public bool CodeInExpansion(String code, string? system = null) diff --git a/src/Hl7.Fhir.Conformance/Rest/FhirClientTermSvcExtensions.cs b/src/Hl7.Fhir.Conformance/Rest/FhirClientTermSvcExtensions.cs index 5e2513820b..586660679f 100644 --- a/src/Hl7.Fhir.Conformance/Rest/FhirClientTermSvcExtensions.cs +++ b/src/Hl7.Fhir.Conformance/Rest/FhirClientTermSvcExtensions.cs @@ -23,6 +23,7 @@ public static async Task ExpandValueSetAsync(this BaseFhirClient clien .OperationResult(); } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static ValueSet ExpandValueSet(this BaseFhirClient client, Uri valueset, FhirString filter = null, FhirDateTime date = null) { @@ -43,6 +44,7 @@ public static async Task ExpandValueSetAsync(this BaseFhirClient clien .OperationResult(); } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static ValueSet ExpandValueSet(this BaseFhirClient client, FhirUri identifier, FhirString filter = null, FhirDateTime date = null) { @@ -61,6 +63,7 @@ public static async Task ExpandValueSetAsync(this BaseFhirClient clien .OperationResult(); } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static ValueSet ExpandValueSet(this BaseFhirClient client, ValueSet vs, FhirString filter = null, FhirDateTime date = null) { @@ -88,6 +91,7 @@ public static async Task ConceptLookupAsync(this BaseFhirClient clie .OperationResult(); } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static Parameters ConceptLookup(this BaseFhirClient client, Code code = null, FhirUri system = null, FhirString version = null, Coding coding = null, FhirDateTime date = null, Code displayLanguage = null, Code property = null) @@ -131,6 +135,7 @@ public static async Task ValidateCodeAsync(this BaseFhirClie return null; } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static ValidateCodeResult ValidateCode(this BaseFhirClient client, String valueSetId, FhirUri url = null, FhirUri context = null, ValueSet valueSet = null, Code code = null, FhirUri system = null, FhirString version = null, FhirString display = null, @@ -169,6 +174,7 @@ public async static Task ValidateCodeAsync(this BaseFhirClie return null; } + [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] public static ValidateCodeResult ValidateCode(this BaseFhirClient client, FhirUri url = null, FhirUri context = null, ValueSet valueSet = null, Code code = null, FhirUri system = null, FhirString version = null, FhirString display = null, diff --git a/src/Hl7.Fhir.Conformance/Specification/Source/Summary/ArtifactSummaryGenerator.cs b/src/Hl7.Fhir.Conformance/Specification/Source/Summary/ArtifactSummaryGenerator.cs index c5ce2ea756..b856c1a70d 100644 --- a/src/Hl7.Fhir.Conformance/Specification/Source/Summary/ArtifactSummaryGenerator.cs +++ b/src/Hl7.Fhir.Conformance/Specification/Source/Summary/ArtifactSummaryGenerator.cs @@ -68,11 +68,6 @@ public static readonly ArtifactSummaryHarvester[] ConformanceHarvesters }; private readonly IModelInfo _modelInfo; - /// Singleton. Returns a global default instance. - [Obsolete("This static property uses an incorrect ModelInspector. Use new ArtifactSummaryGenerator(ModelInspector) instead. " + - "Obsolete since 2023-05-03. Will be removed in the next major release.")] - public static ArtifactSummaryGenerator Default { get; } = new ArtifactSummaryGenerator(ModelInspector.ForAssembly(typeof(IModelInfo).Assembly)); - /// Default constructor. Creates a new instance of the . public ArtifactSummaryGenerator(IModelInfo modelInfo) { diff --git a/src/Hl7.Fhir.R4/CompatibilitySuppressions.xml b/src/Hl7.Fhir.R4/CompatibilitySuppressions.xml index 559447683e..b2f43694a3 100644 --- a/src/Hl7.Fhir.R4/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.R4/CompatibilitySuppressions.xml @@ -43,6 +43,20 @@ lib/net8.0/Hl7.Fhir.R4.dll true + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.CapabilityStatement(Hl7.Fhir.Rest.BaseFhirClient,System.Nullable{Hl7.Fhir.Rest.SummaryType}) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.Meta(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.ResourceType) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -50,6 +64,13 @@ lib/net8.0/Hl7.Fhir.R4.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -64,6 +85,13 @@ lib/net8.0/Hl7.Fhir.R4.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoSerializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) @@ -92,6 +120,34 @@ lib/net8.0/Hl7.Fhir.R4.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) @@ -232,6 +288,13 @@ lib/net8.0/Hl7.Fhir.R4.dll true + + CP0002 + M:Hl7.Fhir.Specification.Source.ZipSource.get_Source + lib/net8.0/Hl7.Fhir.R4.dll + lib/net8.0/Hl7.Fhir.R4.dll + true + CP0007 T:Hl7.Fhir.Serialization.FhirJsonSerializer diff --git a/src/Hl7.Fhir.R4B/CompatibilitySuppressions.xml b/src/Hl7.Fhir.R4B/CompatibilitySuppressions.xml index 7b94a45083..dc87f75b22 100644 --- a/src/Hl7.Fhir.R4B/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.R4B/CompatibilitySuppressions.xml @@ -50,6 +50,20 @@ lib/net8.0/Hl7.Fhir.R4B.dll true + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.CapabilityStatement(Hl7.Fhir.Rest.BaseFhirClient,System.Nullable{Hl7.Fhir.Rest.SummaryType}) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.Meta(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.ResourceType) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -57,6 +71,13 @@ lib/net8.0/Hl7.Fhir.R4B.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -71,6 +92,13 @@ lib/net8.0/Hl7.Fhir.R4B.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoSerializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) @@ -99,6 +127,34 @@ lib/net8.0/Hl7.Fhir.R4B.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) @@ -239,6 +295,13 @@ lib/net8.0/Hl7.Fhir.R4B.dll true + + CP0002 + M:Hl7.Fhir.Specification.Source.ZipSource.get_Source + lib/net8.0/Hl7.Fhir.R4B.dll + lib/net8.0/Hl7.Fhir.R4B.dll + true + CP0007 T:Hl7.Fhir.Serialization.FhirJsonSerializer diff --git a/src/Hl7.Fhir.R5/CompatibilitySuppressions.xml b/src/Hl7.Fhir.R5/CompatibilitySuppressions.xml index 480d1cc528..48830b10d1 100644 --- a/src/Hl7.Fhir.R5/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.R5/CompatibilitySuppressions.xml @@ -57,6 +57,20 @@ lib/net8.0/Hl7.Fhir.R5.dll true + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.CapabilityStatement(Hl7.Fhir.Rest.BaseFhirClient,System.Nullable{Hl7.Fhir.Rest.SummaryType}) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.Meta(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.ResourceType) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -64,6 +78,13 @@ lib/net8.0/Hl7.Fhir.R5.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -78,6 +99,13 @@ lib/net8.0/Hl7.Fhir.R5.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoSerializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) @@ -106,6 +134,34 @@ lib/net8.0/Hl7.Fhir.R5.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) @@ -246,6 +302,13 @@ lib/net8.0/Hl7.Fhir.R5.dll true + + CP0002 + M:Hl7.Fhir.Specification.Source.ZipSource.get_Source + lib/net8.0/Hl7.Fhir.R5.dll + lib/net8.0/Hl7.Fhir.R5.dll + true + CP0007 T:Hl7.Fhir.Serialization.FhirJsonSerializer diff --git a/src/Hl7.Fhir.STU3.Tests/Rest/FhirClientTests.cs b/src/Hl7.Fhir.STU3.Tests/Rest/FhirClientTests.cs index 057914c583..4e29bf10f8 100644 --- a/src/Hl7.Fhir.STU3.Tests/Rest/FhirClientTests.cs +++ b/src/Hl7.Fhir.STU3.Tests/Rest/FhirClientTests.cs @@ -62,15 +62,15 @@ public static void ClassInitialize(TestContext testContext) | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls13; - CreateItems(); + CreateItems().WaitNoResult(); } - private static void CreateItems() + private static async Tasks.Task CreateItems() { var client = new FhirClient(testEndpoint); client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; var pat = new Patient() { @@ -104,8 +104,8 @@ private static void CreateItems() // Create the patient Console.WriteLine("Creating patient..."); - Patient p = client.Update(pat); - var l = client.Update(loc); + Patient p = await client.UpdateAsync(pat); + var l = await client.UpdateAsync(loc); Trace.WriteLine(l); Assert.IsNotNull(p); } @@ -141,18 +141,18 @@ public static void DebugDumpBundle(Hl7.Fhir.Model.Bundle b) } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void FetchConformanceHttpClient() + public async Tasks.Task FetchConformanceHttpClient() { using (var client = new FhirClient(testEndpoint)) { - TestConformance(client); + await TestConformance(client); } } - private void TestConformance(BaseFhirClient client) + private async Tasks.Task TestConformance(BaseFhirClient client) { client.Settings.ParserSettings.AllowUnrecognizedEnums = true; - var entry = client.CapabilityStatement(); + var entry = await client.CapabilityStatementAsync(); Assert.IsNotNull(entry); Assert.IsNotNull(entry.FhirVersion); @@ -160,7 +160,7 @@ private void TestConformance(BaseFhirClient client) Assert.AreEqual(CapabilityStatement.RestfulCapabilityMode.Server, entry.Rest[0].Mode.Value); Assert.AreEqual("200", client.LastResult.Status); - entry = client.CapabilityStatement(SummaryType.True); + entry = await client.CapabilityStatementAsync(SummaryType.True); Assert.IsNull(entry.Text); // DSTU2 has this property as not include as part of the summary (that would be with SummaryType.Text) Assert.IsNotNull(entry); @@ -175,65 +175,65 @@ private void TestConformance(BaseFhirClient client) } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void PatchHttpClient() + public async Tasks.Task PatchHttpClient() { using var client = new FhirClient(testEndpoint); - Patch(client); + await Patch(client); } - private void Patch(BaseFhirClient client) + private async Tasks.Task Patch(BaseFhirClient client) { var patchparams = new Parameters(); patchparams.AddAddPatchParameter("Patient", "birthdate", new Date("1930-01-01")); - client.Patch("example", patchparams); + await client.PatchAsync("example", patchparams); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void CondionalPatchHttpClient() + public async Tasks.Task CondionalPatchHttpClient() { using var client = new FhirClient(testEndpoint); - ConditionalPatch(client); + await ConditionalPatch(client); } - private void ConditionalPatch(BaseFhirClient client) + private async Tasks.Task ConditionalPatch(BaseFhirClient client) { var patchparams = new Parameters(); patchparams.AddAddPatchParameter("Patient", "birthdate", new Date("1930-01-01")); var condition = new SearchParams().Where("name=Donald"); - client.Patch(condition, patchparams); + await client.ConditionalPatchAsync(condition, patchparams); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void ReadWithFormatHttpClient() + public async Tasks.Task ReadWithFormatHttpClient() { using (var client = new FhirClient(testEndpoint)) { - testReadWithFormat(client); + await testReadWithFormat(client); } } - private void testReadWithFormat(BaseFhirClient client) + private async Tasks.Task testReadWithFormat(BaseFhirClient client) { client.Settings.UseFormatParameter = true; client.Settings.PreferredFormat = ResourceFormat.Json; - var loc = client.Read("Patient/example"); + var loc = await client.ReadAsync("Patient/example"); Assert.IsNotNull(loc); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] [ExpectedException(typeof(FhirOperationException))] - public void ReadWrongResourceTypeHttpClient() + public async Tasks.Task ReadWrongResourceTypeHttpClient() { FhirClient client = new FhirClient(testEndpoint); - testReadWrongResourceType(client); + await testReadWrongResourceType(client); } - private static void testReadWrongResourceType(BaseFhirClient client) + private static async Tasks.Task testReadWrongResourceType(BaseFhirClient client) { - var pat = client.Read("Location/" + locationId); + var pat = await client.ReadAsync("Location/" + locationId); Trace.WriteLine(pat); } @@ -246,21 +246,21 @@ public async Tasks.Task ReadHttpClient() private async Tasks.Task testReadClientAsync(BaseFhirClient client) { - var loc = client.Read("Location/" + locationId); + var loc = await client.ReadAsync("Location/" + locationId); Assert.IsNotNull(loc); Assert.AreEqual("Den Burg", loc.Address.City); Assert.AreEqual(locationId, loc.Id); Assert.IsNotNull(loc.Meta.VersionId); - var loc2 = client.Read(ResourceIdentity.Build("Location", locationId, loc.Meta.VersionId)); + var loc2 = await client.ReadAsync(ResourceIdentity.Build("Location", locationId, loc.Meta.VersionId)); Assert.IsNotNull(loc2); Assert.AreEqual(loc2.Id, loc.Id); Assert.AreEqual(loc2.Meta.VersionId, loc.Meta.VersionId); try { - var l = client.Read(new Uri("Location/45qq54", UriKind.Relative)); + var l = await client.ReadAsync(new Uri("Location/45qq54", UriKind.Relative)); Trace.WriteLine(l); Assert.Fail(); } @@ -270,35 +270,35 @@ private async Tasks.Task testReadClientAsync(BaseFhirClient client) Assert.AreEqual("404", client.LastResult.Status); } - var loc3 = client.Read(ResourceIdentity.Build("Location", locationId, loc.Meta.VersionId)); + var loc3 = await client.ReadAsync(ResourceIdentity.Build("Location", locationId, loc.Meta.VersionId)); Assert.IsNotNull(loc3); var jsonSer = new FhirJsonSerializer(); Assert.AreEqual(await jsonSer.SerializeToStringAsync(loc), await jsonSer.SerializeToStringAsync(loc3)); - var loc4 = client.Read(loc.ResourceIdentity()); + var loc4 = await client.ReadAsync(loc.ResourceIdentity()); Assert.IsNotNull(loc4); Assert.AreEqual(await jsonSer.SerializeToStringAsync(loc), await jsonSer.SerializeToStringAsync(loc4)); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void ReadRelativeHttpClient() + public async Tasks.Task ReadRelativeHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { - testReadRelative(client); + await testReadRelative(client); } } - private void testReadRelative(BaseFhirClient client) + private async Tasks.Task testReadRelative(BaseFhirClient client) { - var loc = client.Read(new Uri("Location/" + locationId, UriKind.Relative)); + var loc = await client.ReadAsync(new Uri("Location/" + locationId, UriKind.Relative)); Assert.IsNotNull(loc); Assert.AreEqual("Den Burg", loc.Address.City); var ri = ResourceIdentity.Build(testEndpoint, "Location", locationId); - loc = client.Read(ri); + loc = await client.ReadAsync(ri); Assert.IsNotNull(loc); Assert.AreEqual("Den Burg", loc.Address.City); } @@ -335,7 +335,7 @@ private void testRelativeAsyncClient(BaseFhirClient client) [TestMethod, Ignore] // Something does not work with the gzip [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void SearchHttpClient() + public async Tasks.Task SearchHttpClient() { using (var handler = new HttpClientHandler()) using (FhirClient client = new FhirClient(testEndpoint, messageHandler: handler)) @@ -344,14 +344,14 @@ public void SearchHttpClient() handler.AutomaticDecompression = DecompressionMethods.GZip; - result = client.Search(); + result = await client.SearchAsync(); Assert.IsNotNull(result); Assert.IsTrue(result.Entry.Count > 10, "Test should use testdata with more than 10 reports"); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; - result = client.Search(pageSize: 10); + result = await client.SearchAsync(pageSize: 10); Assert.IsNotNull(result); Assert.IsTrue(result.Entry.Count <= 10); @@ -364,7 +364,7 @@ public void SearchHttpClient() handler.AutomaticDecompression = DecompressionMethods.Deflate; - result = client.Search(new string[] { "name=Chalmers", "name=Peter" }); + result = await client.SearchAsync([ "name=Chalmers", "name=Peter" ]); Assert.IsNotNull(result); Assert.IsTrue(result.Entry.Count > 0); @@ -373,15 +373,15 @@ public void SearchHttpClient() [TestMethod, TestCategory("FhirClient")] [ExpectedException(typeof(ArgumentException))] - public void SearchInvalidCriteriaHttpClient() + public async Tasks.Task SearchInvalidCriteriaHttpClient() { var client = new FhirClient(testEndpoint); - testSearchInvalidCriteria(client); + await testSearchInvalidCriteria(client); } - private void testSearchInvalidCriteria(BaseFhirClient client) + private async Tasks.Task testSearchInvalidCriteria(BaseFhirClient client) { - var p = client.Search(new string[] { "test" }); + var p = await client.SearchAsync(["test"]); Trace.WriteLine(p); } @@ -479,17 +479,17 @@ public void SearchAsyncHttpClient() [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void PagingHttpClient() + public async Tasks.Task PagingHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { - testPaging(client); + await testPaging(client); } } - private void testPaging(BaseFhirClient client) + private async Tasks.Task testPaging(BaseFhirClient client) { - var result = client.Search(pageSize: 10); + var result = await client.SearchAsync(pageSize: 10); Assert.IsNotNull(result); Assert.IsTrue(result.Entry.Count <= 10); @@ -497,62 +497,62 @@ private void testPaging(BaseFhirClient client) // Browse forward - result = client.Continue(result); + result = await client.ContinueAsync(result); Assert.IsNotNull(result); var nextId = result.Entry.First().Resource.Id; Assert.AreNotEqual(firstId, nextId); // Browse to first - result = client.Continue(result, PageDirection.First); + result = await client.ContinueAsync(result, PageDirection.First); Assert.IsNotNull(result); var prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); // Forward, then backwards - result = client.Continue(result, PageDirection.Next); + result = await client.ContinueAsync(result, PageDirection.Next); Assert.IsNotNull(result); - result = client.Continue(result, PageDirection.Previous); + result = await client.ContinueAsync(result, PageDirection.Previous); Assert.IsNotNull(result); prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void PagingInJsonHttpClient() + public async Tasks.Task PagingInJsonHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { - testPagingInJson(client); + await testPagingInJson(client); } } - private static void testPagingInJson(BaseFhirClient client) + private static async Tasks.Task testPagingInJson(BaseFhirClient client) { client.Settings.PreferredFormat = ResourceFormat.Json; - var result = client.Search(pageSize: 10); + var result = await client.SearchAsync(pageSize: 10); Assert.IsNotNull(result); Assert.IsTrue(result.Entry.Count <= 10); var firstId = result.Entry.First().Resource.Id; // Browse forward - result = client.Continue(result); + result = await client.ContinueAsync(result); Assert.IsNotNull(result); var nextId = result.Entry.First().Resource.Id; Assert.AreNotEqual(firstId, nextId); // Browse to first - result = client.Continue(result, PageDirection.First); + result = await client.ContinueAsync(result, PageDirection.First); Assert.IsNotNull(result); var prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); // Forward, then backwards - result = client.Continue(result, PageDirection.Next); + result = await client.ContinueAsync(result, PageDirection.Next); Assert.IsNotNull(result); - result = client.Continue(result, PageDirection.Previous); + result = await client.ContinueAsync(result, PageDirection.Previous); Assert.IsNotNull(result); prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); @@ -560,27 +560,27 @@ private static void testPagingInJson(BaseFhirClient client) [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void CreateAndFullRepresentationHttpClient() + public async Tasks.Task CreateAndFullRepresentationHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { - testCreateAndFullRepresentation(client); + await testCreateAndFullRepresentation(client); } } - private static void testCreateAndFullRepresentation(BaseFhirClient client) + private static async Tasks.Task testCreateAndFullRepresentation(BaseFhirClient client) { - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; // which is also the default + client.Settings.ReturnPreference = ReturnPreference.Representation; // which is also the default - var pat = client.Read("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); ResourceIdentity ri = pat.ResourceIdentity().WithBase(client.Endpoint); pat.Id = null; pat.Identifier.Clear(); - var patC = client.Create(pat); + var patC = await client.CreateAsync(pat); Assert.IsNotNull(patC); - client.Settings.PreferredReturn = Prefer.ReturnMinimal; - patC = client.Create(pat); + client.Settings.ReturnPreference = ReturnPreference.Minimal; + patC = await client.CreateAsync(pat); Assert.IsNull(patC); @@ -591,11 +591,11 @@ private static void testCreateAndFullRepresentation(BaseFhirClient client) } // Now validate this resource - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; // which is also the default + client.Settings.ReturnPreference = ReturnPreference.Representation; // which is also the default var p = new Parameters(); // p.Add("mode", new FhirString("create")); p.Add("resource", pat); - OperationOutcome ooI = (OperationOutcome)client.InstanceOperation(ri.WithoutVersion(), "validate", p); + OperationOutcome ooI = (OperationOutcome)await client.InstanceOperationAsync(ri.WithoutVersion(), "validate", p); Assert.IsNotNull(ooI); } @@ -621,21 +621,21 @@ private async Tasks.Task testCreateEditDeleteAsync(BaseFhirClient client) { // client.CompressRequestBody = true; - var pat = client.Read("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); pat.Id = null; pat.Identifier.Clear(); pat.Identifier.Add(new Identifier("http://hl7.org/test/2", "99999")); System.Diagnostics.Trace.WriteLine(await new FhirXmlSerializer().SerializeToStringAsync(pat)); - var fe = client.Create(pat); // Create as we are not providing the ID to be used. + var fe = await client.CreateAsync(pat); // Create as we are not providing the ID to be used. Assert.IsNotNull(fe); Assert.IsNotNull(fe.Id); Assert.IsNotNull(fe.Meta.VersionId); createdTestPatientUrl = fe.ResourceIdentity(); fe.Identifier.Add(new Identifier("http://hl7.org/test/2", "3141592")); - var fe2 = client.Update(fe); + var fe2 = await client.UpdateAsync(fe); Assert.IsNotNull(fe2); Assert.AreEqual(fe.Id, fe2.Id); @@ -643,16 +643,16 @@ private async Tasks.Task testCreateEditDeleteAsync(BaseFhirClient client) Assert.AreEqual(2, fe2.Identifier.Count); fe.Identifier.Add(new Identifier("http://hl7.org/test/3", "3141592")); - var fe3 = client.Update(fe); + var fe3 = await client.UpdateAsync(fe); Assert.IsNotNull(fe3); Assert.AreEqual(3, fe3.Identifier.Count); - client.Delete(fe3); + await client.DeleteAsync(fe3); try { // Get most recent version - fe = client.Read(fe.ResourceIdentity().WithoutVersion()); + fe = await client.ReadAsync(fe.ResourceIdentity().WithoutVersion()); Assert.Fail(); } catch (FhirOperationException ex) @@ -665,13 +665,13 @@ private async Tasks.Task testCreateEditDeleteAsync(BaseFhirClient client) [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] //Test for github issue https://github.com/FirelyTeam/firely-net-sdk/issues/145 - public void Create_ObservationWithValueAsSimpleQuantity_ReadReturnsValueAsQuantityHttpClient() + public async Tasks.Task Create_ObservationWithValueAsSimpleQuantity_ReadReturnsValueAsQuantityHttpClient() { using var client = new FhirClient(testEndpoint); - testCreateObservationWithQuantity(client); + await testCreateObservationWithQuantity(client); } - private static void testCreateObservationWithQuantity(BaseFhirClient client) + private static async Tasks.Task testCreateObservationWithQuantity(BaseFhirClient client) { var observation = new Observation { @@ -686,8 +686,8 @@ private static void testCreateObservationWithQuantity(BaseFhirClient client) }, BodySite = new CodeableConcept("http://snomed.info/sct", "182756003") }; - var fe = client.Create(observation); - fe = client.Read(fe.ResourceIdentity().WithoutVersion()); + var fe = await client.CreateAsync(observation); + fe = await client.ReadAsync(fe.ResourceIdentity().WithoutVersion()); Assert.IsInstanceOfType(fe.Value, typeof(Quantity)); } @@ -782,7 +782,7 @@ private async Tasks.Task testHistoryAsync(BaseFhirClient client) System.Diagnostics.Trace.WriteLine("History of this specific patient since just before the create, update, update, delete (4 operations)"); - Bundle history = client.History(createdTestPatientUrl); + Bundle history = await client.HistoryAsync(createdTestPatientUrl); Assert.IsNotNull(history); DebugDumpBundle(history); @@ -795,7 +795,7 @@ private async Tasks.Task testHistoryAsync(BaseFhirClient client) System.Diagnostics.Trace.WriteLine("\r\nHistory on the patient type"); - history = client.TypeHistory("Patient", timestampBeforeCreationAndDeletions.ToUniversalTime()); + history = await client.TypeHistoryAsync("Patient", timestampBeforeCreationAndDeletions.ToUniversalTime()); Assert.IsNotNull(history); DebugDumpBundle(history); Assert.AreEqual(4, history.Entry.Count); // there's a race condition here, sometimes this is 5. @@ -804,7 +804,7 @@ private async Tasks.Task testHistoryAsync(BaseFhirClient client) System.Diagnostics.Trace.WriteLine("\r\nHistory on the patient type (using the generic method in the client)"); - history = client.TypeHistory(timestampBeforeCreationAndDeletions.ToUniversalTime(), summary: SummaryType.True); + history = await client.TypeHistoryAsync(timestampBeforeCreationAndDeletions.ToUniversalTime(), summary: SummaryType.True); Assert.IsNotNull(history); DebugDumpBundle(history); Assert.AreEqual(4, history.Entry.Count); @@ -814,7 +814,7 @@ private async Tasks.Task testHistoryAsync(BaseFhirClient client) if (!testEndpoint.OriginalString.Contains("sqlonfhir-stu3")) { System.Diagnostics.Trace.WriteLine("\r\nWhole system history since the start of this test"); - history = client.WholeSystemHistory(timestampBeforeCreationAndDeletions.ToUniversalTime()); + history = await client.WholeSystemHistoryAsync(timestampBeforeCreationAndDeletions.ToUniversalTime()); Assert.IsNotNull(history); DebugDumpBundle(history); Assert.IsTrue(4 <= history.Entry.Count, "Whole System history should have at least 4 new events"); @@ -826,30 +826,30 @@ private async Tasks.Task testHistoryAsync(BaseFhirClient client) [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestWithParamHttpClient() + public async Tasks.Task TestWithParamHttpClient() { using (var client = new FhirClient(testEndpoint)) { - gettWithParam(client); + await gettWithParam(client); } } - private static void gettWithParam(BaseFhirClient client) + private static async Tasks.Task gettWithParam(BaseFhirClient client) { - var res = client.Get("ValueSet/v2-0131/$validate-code?system=http://hl7.org/fhir/v2/0131&code=ep"); + var res = await client.GetAsync("ValueSet/v2-0131/$validate-code?system=http://hl7.org/fhir/v2/0131&code=ep"); Assert.IsNotNull(res); } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void ManipulateMetaHttpClient() + public async Tasks.Task ManipulateMetaHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { - testManipulateMeta(client); + await testManipulateMeta(client); } } - private void testManipulateMeta(BaseFhirClient client) + private async Tasks.Task testManipulateMeta(BaseFhirClient client) { var pat = new Patient { @@ -861,7 +861,7 @@ private void testManipulateMeta(BaseFhirClient client) pat.Meta.Tag.Add(new Coding("http://mysystem.com/tag", "sometag1-" + key)); //Before we begin, ensure that our new tags are not actually used when doing System Meta() - var wsm = client.Meta(); + var wsm = await client.MetaAsync(); Assert.IsNotNull(wsm); Assert.IsFalse(wsm.Profile.Contains("http://someserver.org/fhir/StructureDefinition/XYZ1-" + key)); @@ -874,22 +874,22 @@ private void testManipulateMeta(BaseFhirClient client) // First, create a patient with the first set of meta - var pat2 = client.Create(pat); + var pat2 = await client.CreateAsync(pat); var loc = pat2.ResourceIdentity(testEndpoint); // Meta should be present on created patient verifyMeta(pat2.Meta, false, key); // Should be present when doing instance Meta() - var par = client.Meta(loc); + var par = await client.MetaAsync(loc); verifyMeta(par, false, key); // Should be present when doing type Meta() - par = client.Meta(ResourceType.Patient); + par = await client.MetaAsync(ResourceType.Patient); verifyMeta(par, false, key); // Should be present when doing System Meta() - par = client.Meta(); + par = await client.MetaAsync(); verifyMeta(par, false, key); // Now add some additional meta to the patient @@ -900,44 +900,44 @@ private void testManipulateMeta(BaseFhirClient client) newMeta.Tag.Add(new Coding("http://mysystem.com/tag", "sometag2-" + key)); - client.AddMeta(loc, newMeta); - var pat3 = client.Read(loc); + await client.AddMetaAsync(loc, newMeta); + var pat3 = await client.ReadAsync(loc); // New and old meta should be present on instance verifyMeta(pat3.Meta, true, key); // New and old meta should be present on Meta() - par = client.Meta(loc); + par = await client.MetaAsync(loc); verifyMeta(par, true, key); // New and old meta should be present when doing type Meta() - par = client.Meta(ResourceType.Patient); + par = await client.MetaAsync(ResourceType.Patient); verifyMeta(par, true, key); // New and old meta should be present when doing system Meta() - par = client.Meta(); + par = await client.MetaAsync(); verifyMeta(par, true, key); // Now, remove those new meta tags - client.DeleteMeta(loc, newMeta); + await client.DeleteMetaAsync(loc, newMeta); // Should no longer be present on instance - var pat4 = client.Read(loc); + var pat4 = await client.ReadAsync(loc); verifyMeta(pat4.Meta, false, key); // Should no longer be present when doing instance Meta() - par = client.Meta(loc); + par = await client.MetaAsync(loc); verifyMeta(par, false, key); // Should no longer be present when doing type Meta() - par = client.Meta(ResourceType.Patient); + par = await client.MetaAsync(ResourceType.Patient); verifyMeta(par, false, key); // clear out the client that we created, no point keeping it around - client.Delete(pat4); + await client.DeleteAsync(pat4); // Should no longer be present when doing System Meta() - par = client.Meta(); + par = await client.MetaAsync(); verifyMeta(par, false, key); } @@ -964,17 +964,17 @@ private void verifyMeta(Meta meta, bool hasNew, int key) [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestSearchUsingPostMultipleIncludesShouldNotThrowArgumentExceptionHttpClient() + public async Tasks.Task TestSearchUsingPostMultipleIncludesShouldNotThrowArgumentExceptionHttpClient() { // This test case proves issue https://github.com/FirelyTeam/firely-net-sdk/issues/1206 is fixed. // Previoulsly EntryToHttpExtensions.setBodyAndContentType used a Dictionary which required the // name part of the parameters to be unique. // Fixed by using IEnumerable> instead of Dictionary var client = new FhirClient(testEndpoint); - searchUsingPostWithIncludes(client); + await searchUsingPostWithIncludes(client); } - private static void searchUsingPostWithIncludes(BaseFhirClient client) + private static async Tasks.Task searchUsingPostWithIncludes(BaseFhirClient client) { var sp = new SearchParams(); sp.Parameters.Add(new Tuple("_id", "8465,8479")); @@ -982,40 +982,40 @@ private static void searchUsingPostWithIncludes(BaseFhirClient client) // Add a further include sp.Include.Add(("encounter", IncludeModifier.None)); - client.SearchUsingPost(sp); + await client.SearchUsingPostAsync(sp); } [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestSearchByPersonaCodeHttpClient() + public async Tasks.Task TestSearchByPersonaCodeHttpClient() { using (var client = new FhirClient(testEndpoint)) { - searchByPersonaCode(client); + await searchByPersonaCode(client); } } - private static void searchByPersonaCode(BaseFhirClient client) + private static async Tasks.Task searchByPersonaCode(BaseFhirClient client) { var pats = - client.Search(new[] { string.Format("identifier={0}|{1}", "urn:oid:1.2.36.146.595.217.0.1", "12345") }); + await client.SearchAsync(new[] { string.Format("identifier={0}|{1}", "urn:oid:1.2.36.146.595.217.0.1", "12345") }); var pat = (Patient)pats.Entry.First().Resource; Trace.WriteLine(pat); } [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestSearchUsingPostByPersonaCodeHttpClient() + public async Tasks.Task TestSearchUsingPostByPersonaCodeHttpClient() { using (var client = new FhirClient(_endpointSupportingSearchUsingPost)) { - searchByPersonaCodeUsingPost(client); + await searchByPersonaCodeUsingPost(client); } } - private static void searchByPersonaCodeUsingPost(BaseFhirClient client) + private static async Tasks.Task searchByPersonaCodeUsingPost(BaseFhirClient client) { - var pats = client.SearchUsingPost(new[] { string.Format("identifier={0}|{1}", "urn:oid:1.2.36.146.595.217.0.1", "12345") }, new[] { "generalPractitioner" }, null, null, null); + var pats = await client.SearchUsingPostAsync(new[] { string.Format("identifier={0}|{1}", "urn:oid:1.2.36.146.595.217.0.1", "12345") }, new[] { "generalPractitioner" }, null, null, null); var pat = (Patient)pats.Entry.First().Resource; Trace.WriteLine(pat); } @@ -1043,13 +1043,13 @@ private static async Tasks.Task testCreateDynamicHttpClientAsync(BaseFhirClient }; System.Diagnostics.Trace.WriteLine(await new FhirXmlSerializer().SerializeToStringAsync(furore)); - var fe = client.Create(furore); + var fe = await client.CreateAsync(furore); Assert.IsNotNull(fe); } [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void CallsCallbacksHttpClientHandler() + public async Tasks.Task CallsCallbacksHttpClientHandler() { using (var handler = new HttpClientEventHandler()) { @@ -1074,7 +1074,7 @@ public void CallsCallbacksHttpClientHandler() status = e.RawResponse.StatusCode; }; - var pat = client.Read("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -1084,7 +1084,7 @@ public void CallsCallbacksHttpClientHandler() Assert.IsTrue(bodyText.Contains("("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -1124,7 +1124,7 @@ public void CallsCallbacksHttpClientHandler() Assert.IsTrue(bodyText.Contains("("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -1172,7 +1172,7 @@ public void CallsCallbacksHttpClient() Assert.IsTrue(bodyText.Contains("("Patient/" + patientId); + var pat = await client.ReadAsync("Patient/" + patientId); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -1212,7 +1212,7 @@ public void CallsCallbacksHttpClient() Assert.IsTrue(bodyText.Contains("("Patient/glossy"); + var result = await client.ReadAsync("Patient/glossy"); Assert.IsNotNull(result); result.Id = null; result.Meta = null; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; - var posted = client.Create(result); + client.Settings.ReturnPreference = ReturnPreference.Representation; + var posted = await client.CreateAsync(result); Assert.IsNotNull(posted, "Patient example not found"); - posted = client.Create(result); + posted = await client.CreateAsync(result); Assert.IsNotNull(posted, "Did not return a resource, even when ReturnFullResource=true"); - client.Settings.PreferredReturn = Prefer.ReturnMinimal; - posted = client.Create(result); + client.Settings.ReturnPreference = ReturnPreference.Minimal; + posted = await client.CreateAsync(result); Assert.IsNull(posted); } [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] // Currently ignoring, as spark.furore.com returns Status 500. - public void TestReceiveHtmlIsHandledHttpClient() + public async Tasks.Task TestReceiveHtmlIsHandledHttpClient() { using var client = new FhirClient("http://spark.furore.com/"); // an address that returns html try { - var pat = client.Read("Patient/1"); + var pat = await client.ReadAsync("Patient/1"); Trace.WriteLine(pat); } catch (FhirOperationException fe) @@ -1288,30 +1287,30 @@ public void TestReceiveHtmlIsHandledHttpClient() } [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestRefreshHttpClient() + public async Tasks.Task TestRefreshHttpClient() { using var client = new FhirClient(testEndpoint); - clientReadRefresh(client); + await clientReadRefresh(client); } - private static void clientReadRefresh(BaseFhirClient client) + private static async Tasks.Task clientReadRefresh(BaseFhirClient client) { - var result = client.Read("Patient/" + patientId); + var result = await client.ReadAsync("Patient/" + patientId); var orig = result.Name[0].FamilyElement.Value; result.Name[0].FamilyElement.Value = "overwritten name"; - result = client.Refresh(result); + result = await client.RefreshAsync(result); Assert.AreEqual(orig, result.Name[0].FamilyElement.Value); } - private static void testHandlingHtmlErrorStatus(BaseFhirClient client) + private static async Tasks.Task testHandlingHtmlErrorStatus(BaseFhirClient client) { try { - var pat = client.Read("Patient/1"); + var pat = await client.ReadAsync("Patient/1"); Trace.WriteLine(pat); Assert.Fail("Failed to throw an Exception on status 500"); } @@ -1351,17 +1350,17 @@ private static void testHandlingHtmlErrorStatus(BaseFhirClient client) [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void TestReceiveErrorStatusWithOperationOutcomeIsHandledHttpClient() + public async Tasks.Task TestReceiveErrorStatusWithOperationOutcomeIsHandledHttpClient() { using var client = new FhirClient("http://test.fhir.org/r3");// an address that returns Status 404 with an OperationOutcome - testHandlingErrorStatusAsOperationOutcome(client); + await testHandlingErrorStatusAsOperationOutcome(client); } - private static void testHandlingErrorStatusAsOperationOutcome(BaseFhirClient client) + private static async Tasks.Task testHandlingErrorStatusAsOperationOutcome(BaseFhirClient client) { try { - var pat = client.Read("Patient/doesnotexist"); + var pat = await client.ReadAsync("Patient/doesnotexist"); Trace.WriteLine(pat); Assert.Fail("Failed to throw an Exception on status 404"); } @@ -1394,20 +1393,20 @@ private static void testHandlingErrorStatusAsOperationOutcome(BaseFhirClient cli } [TestMethod, TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public void TestAuthenticationOnBeforeHttpClient() + public async Tasks.Task TestAuthenticationOnBeforeHttpClient() { using (FhirClient client = new FhirClient(testEndpoint)) { client.RequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "bad-bearer"); - testAuthentication(client); + await testAuthentication(client); } } - private static void testAuthentication(BaseFhirClient validationFhirClient) + private static async Tasks.Task testAuthentication(BaseFhirClient validationFhirClient) { try { - var pat = validationFhirClient.ValidateResource(new Patient()); + var pat = await validationFhirClient.ValidateResourceAsync(new Patient()); Trace.WriteLine(pat); } @@ -1421,17 +1420,17 @@ private static void testAuthentication(BaseFhirClient validationFhirClient) /// Test for showing issue https://github.com/FirelyTeam/firely-net-sdk/issues/128 /// [TestMethod, TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public void TestCreatingBinaryResourceHttpClient() + public async Tasks.Task TestCreatingBinaryResourceHttpClient() { byte[] arr = File.ReadAllBytes(TestDataHelper.GetFullPathForExample(@"fhir-logo.png")); using (var client = new FhirClient(testEndpoint)) { var binary = new Binary() { Content = arr, ContentType = "image/png" }; - var result = client.Create(binary); + var result = await client.CreateAsync(binary); Assert.IsNotNull(result); - var result2 = client.Get($"Binary/{result.Id}"); + var result2 = await client.GetAsync($"Binary/{result.Id}"); Assert.IsNotNull(result2); Assert.IsInstanceOfType(result2, typeof(Binary)); Assert.IsNotNull(result2.Id, "Binary resource should have an Id"); @@ -1444,46 +1443,46 @@ public void TestCreatingBinaryResourceHttpClient() /// Test for showing issue https://github.com/FirelyTeam/firely-net-sdk/issues/1681 /// [TestMethod, TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public void TestPreferOperationOutcome() + public async Tasks.Task TestPreferOperationOutcome() { var client = new FhirClient(testEndpoint); - client.Settings.PreferredReturn = Prefer.OperationOutcome; + client.Settings.ReturnPreference = ReturnPreference.OperationOutcome; var pat = new Patient() { Name = new List { new HumanName().WithGiven("testy").AndFamily("McTestFace") } }; - var pat2 = client.Create(pat); + var pat2 = await client.CreateAsync(pat); Trace.WriteLine(pat2); Assert.IsNotNull(client.LastResult.Outcome); } - private static void testOpEverything(BaseFhirClient client) + private static async Tasks.Task testOpEverything(BaseFhirClient client) { // GET operation $everything without parameters - var loc = client.TypeOperation("everything", null, useGet: true); + var loc = await client.TypeOperationAsync("everything", null, useGet: true); Assert.IsNotNull(loc); // POST operation $everything without parameters - loc = client.TypeOperation("everything", null, useGet: false); + loc = await client.TypeOperationAsync("everything", null, useGet: false); Assert.IsNotNull(loc); // GET operation $everything with 1 primitive parameter - loc = client.TypeOperation("everything", new Parameters().Add("start", new Date(2017, 11)), useGet: true); + loc = await client.TypeOperationAsync("everything", new Parameters().Add("start", new Date(2017, 11)), useGet: true); Assert.IsNotNull(loc); // GET operation $everything with 1 primitive2token parameter - loc = client.TypeOperation("everything", new Parameters().Add("start", new Identifier("", "example")), useGet: true); + loc = await client.TypeOperationAsync("everything", new Parameters().Add("start", new Identifier("", "example")), useGet: true); Assert.IsNotNull(loc); // GET operation $everything with 1 resource parameter try { - loc = client.TypeOperation("everything", new Parameters().Add("start", new Patient()), useGet: true); + loc = await client.TypeOperationAsync("everything", new Parameters().Add("start", new Patient()), useGet: true); Assert.Fail("An InvalidOperationException was expected here"); } catch (Exception ex) @@ -1494,7 +1493,7 @@ private static void testOpEverything(BaseFhirClient client) // GET operation $everything with 1 complex parameter try { - loc = client.TypeOperation("everything", new Parameters().Add("start", new Annotation() { Text = "test" }), useGet: true); + loc = await client.TypeOperationAsync("everything", new Parameters().Add("start", new Annotation() { Text = "test" }), useGet: true); Assert.Fail("An InvalidOperationException was expected here"); } catch (Exception ex) @@ -1503,12 +1502,12 @@ private static void testOpEverything(BaseFhirClient client) } // POST operation $everything with 1 parameter - loc = client.TypeOperation("everything", new Parameters().Add("start", new Date(2017, 10)), useGet: false); + loc = await client.TypeOperationAsync("everything", new Parameters().Add("start", new Date(2017, 10)), useGet: false); Assert.IsNotNull(loc); } [TestMethod, TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public void TestMultipleMessageHandlersInFhirClient() + public async Tasks.Task TestMultipleMessageHandlersInFhirClient() { var testMessageHandler = new TestMessageHandler(); var testDegatingHandler = new TestDeligatingHandler() @@ -1517,7 +1516,7 @@ public void TestMultipleMessageHandlersInFhirClient() }; using var client = new FhirClient(testEndpoint, settings: FhirClientSettings.CreateDefault(), testDegatingHandler); - var l = client.Read("Location/" + locationId); + var l = await client.ReadAsync("Location/" + locationId); Trace.WriteLine(l); Assert.IsNotNull(testDegatingHandler.LastRequest); Assert.IsNotNull(testMessageHandler.LastResponse); diff --git a/src/Hl7.Fhir.STU3.Tests/Rest/OperationsTests.cs b/src/Hl7.Fhir.STU3.Tests/Rest/OperationsTests.cs index f219e83173..26e498050f 100644 --- a/src/Hl7.Fhir.STU3.Tests/Rest/OperationsTests.cs +++ b/src/Hl7.Fhir.STU3.Tests/Rest/OperationsTests.cs @@ -13,6 +13,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Linq; +using Tasks = System.Threading.Tasks; namespace Hl7.Fhir.Tests.Rest { @@ -24,23 +25,23 @@ public class OperationsTests [TestMethod] [TestCategory("IntegrationTest")] - public void InvokeTestPatientGetEverythingHttpClient() + public async Tasks.Task InvokeTestPatientGetEverythingHttpClient() { using (var client = new FhirClient(testEndpoint)) { - patientGetEverything(client); + await patientGetEverything(client); } } - private void patientGetEverything(BaseFhirClient client) + private async Tasks.Task patientGetEverything(BaseFhirClient client) { var start = new FhirDateTime(2014, 11, 1); var end = new FhirDateTime(2015, 1, 1); var par = new Parameters().Add("start", start).Add("end", end); - var bundle = (Bundle)client.InstanceOperation(ResourceIdentity.Build("Patient", "example"), "everything", par); + var bundle = (Bundle)await client.InstanceOperationAsync(ResourceIdentity.Build("Patient", "example"), "everything", par); Assert.IsTrue(bundle.Entry.Any()); - var bundle2 = client.FetchPatientRecord(ResourceIdentity.Build("Patient", "example"), start, end); + var bundle2 = await client.FetchPatientRecordAsync(ResourceIdentity.Build("Patient", "example"), start, end); Assert.IsTrue(bundle2.Entry.Any()); } @@ -62,18 +63,18 @@ private static void expandExistingValueset(BaseFhirClient client) [TestMethod] [TestCategory("IntegrationTest")] - public void InvokeExpandParameterValueSetHttpClient() + public async Tasks.Task InvokeExpandParameterValueSetHttpClient() { using (var client = new FhirClient(FhirClientTests.TerminologyEndpoint)) { - expandParameterValueSet(client); + await expandParameterValueSet(client); } } - private static void expandParameterValueSet(BaseFhirClient client) + private static async Tasks.Task expandParameterValueSet(BaseFhirClient client) { - var vs = client.Read("ValueSet/administrative-gender"); - var vsX = client.ExpandValueSet(vs); + var vs = await client.ReadAsync("ValueSet/administrative-gender"); + var vsX = await client.ExpandValueSetAsync(vs); Assert.IsTrue(vsX.Expansion.Contains.Any()); } @@ -173,39 +174,39 @@ private static void validateCodeByCanonical(BaseFhirClient client) [TestMethod] [TestCategory("IntegrationTest")] - public void InvokeValidateCodeWithVSHttpClient() + public async Tasks.Task InvokeValidateCodeWithVSHttpClient() { using (var client = new FhirClient(FhirClientTests.TerminologyEndpoint)) { - validateCodeWithVS(client); + await validateCodeWithVS(client); }; } - private static void validateCodeWithVS(BaseFhirClient client) + private static async Tasks.Task validateCodeWithVS(BaseFhirClient client) { var coding = new Coding("http://snomed.info/sct", "4322002"); - var vs = client.Read("ValueSet/c80-facilitycodes"); + var vs = await client.ReadAsync("ValueSet/c80-facilitycodes"); Assert.IsNotNull(vs); - var result = client.ValidateCode(valueSet: vs, coding: coding); + var result = await client.ValidateCodeAsync(valueSet: vs, coding: coding); Assert.IsTrue(result.Result?.Value == true); } [TestMethod] [TestCategory("IntegrationTest")] - public void InvokeResourceValidationHttpClient() + public async Tasks.Task InvokeResourceValidationHttpClient() { using (var client = new FhirClient(testEndpoint)) { - validateResource(client); + await validateResource(client); } } - private static void validateResource(BaseFhirClient client) + private static async Tasks.Task validateResource(BaseFhirClient client) { - var pat = client.Read("Patient/pat1"); - var vresult = client.ValidateResource(pat, null, + var pat = await client.ReadAsync("Patient/pat1"); + var vresult = await client.ValidateResourceAsync(pat, null, new FhirUri("http://hl7.org/fhir/StructureDefinition/Patient")); Assert.IsTrue(vresult.Success); } diff --git a/src/Hl7.Fhir.STU3.Tests/Rest/ReadAsyncTests.cs b/src/Hl7.Fhir.STU3.Tests/Rest/ReadAsyncTests.cs index 96fa7443b8..24090668a2 100644 --- a/src/Hl7.Fhir.STU3.Tests/Rest/ReadAsyncTests.cs +++ b/src/Hl7.Fhir.STU3.Tests/Rest/ReadAsyncTests.cs @@ -20,9 +20,7 @@ public static void ClassInitialize(TestContext context) { var client = new FhirClient(_endpoint); client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; - - + client.Settings.ReturnPreference = ReturnPreference.Representation; var pat = new Patient() { @@ -56,8 +54,8 @@ public static void ClassInitialize(TestContext context) // Create the patient Console.WriteLine("Creating patient..."); - Patient p = client.Update(pat); - Location l = client.Update(loc); + Patient p = client.UpdateAsync(pat).WaitResult(); + Location l = client.UpdateAsync(loc).WaitResult(); Assert.IsNotNull(p); } @@ -68,7 +66,7 @@ public async System.Threading.Tasks.Task Read_UsingResourceIdentity_ResultReturn using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await readUsingResourceId(client); } } @@ -90,7 +88,7 @@ public async System.Threading.Tasks.Task Read_UsingLocationString_ResultReturned using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await readUsingLocationString(client); } } diff --git a/src/Hl7.Fhir.STU3.Tests/Rest/SearchAsyncTests.cs b/src/Hl7.Fhir.STU3.Tests/Rest/SearchAsyncTests.cs index f0a873fe1f..106b2e650b 100644 --- a/src/Hl7.Fhir.STU3.Tests/Rest/SearchAsyncTests.cs +++ b/src/Hl7.Fhir.STU3.Tests/Rest/SearchAsyncTests.cs @@ -20,7 +20,7 @@ public async Task Search_UsingSearchParams_SearchReturnedHttpClient() using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await searchUsingParam(client); } } @@ -43,7 +43,7 @@ private static async Task searchUsingParam(BaseFhirClient client) Console.WriteLine( $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); } - result1 = client.Continue(result1, PageDirection.Next); + result1 = await client.ContinueAsync(result1, PageDirection.Next); } Console.WriteLine("Test Completed"); @@ -56,7 +56,7 @@ public async Task SearchUsingPost_UsingSearchParams_SearchReturnedHttpClient() using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await searchUsingPost(client); } } @@ -79,7 +79,7 @@ private static async Task searchUsingPost(BaseFhirClient client) Console.WriteLine( $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); } - result1 = client.Continue(result1, PageDirection.Next); + result1 = await client.ContinueAsync(result1, PageDirection.Next); } Console.WriteLine("Test Completed"); @@ -92,7 +92,7 @@ public void SearchSync_UsingSearchParams_SearchReturnedHttpCLient() using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; searchSync(client); } } @@ -104,7 +104,7 @@ private static void searchSync(BaseFhirClient client) .LimitTo(10) .SummaryOnly(); - var result1 = client.Search(srch); + var result1 = client.SearchAsync(srch).WaitResult(); Assert.IsTrue(result1.Entry.Count >= 1); @@ -116,7 +116,7 @@ private static void searchSync(BaseFhirClient client) Console.WriteLine( $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); } - result1 = client.Continue(result1, PageDirection.Next); + result1 = client.ContinueAsync(result1, PageDirection.Next).WaitResult(); } Console.WriteLine("Test Completed"); @@ -127,7 +127,7 @@ public async Task SearchMultiple_UsingSearchParams_SearchReturnedHttpClient() using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await searchMultiple(client); } } @@ -159,7 +159,7 @@ private static async Task searchMultiple(BaseFhirClient client) Console.WriteLine( $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); } - result1 = client.Continue(result1, PageDirection.Next); + result1 = await client.ContinueAsync(result1, PageDirection.Next); } Console.WriteLine("Test Completed"); @@ -172,7 +172,7 @@ public async Task SearchUsingPostMultiple_UsingSearchParams_SearchReturnedHttpCl using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await searchMultipleUsingPost(client); } } @@ -204,72 +204,7 @@ private static async Task searchMultipleUsingPost(BaseFhirClient client) Console.WriteLine( $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); } - result1 = client.Continue(result1, PageDirection.Next); - } - - Console.WriteLine("Test Completed"); - } - - [TestMethod] - [TestCategory("IntegrationTest")] - public async Task SearchWithCriteria_SyncContinue_SearchReturnedHttpClient() - { - using (var client = new FhirClient(_endpoint)) - { - client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; - await searchWithCriteria(client); - } - } - - private static async Task searchWithCriteria(BaseFhirClient client) - { - var result1 = await client.SearchAsync(new[] { "family=Donald" }); - - Assert.IsTrue(result1.Entry.Count >= 1); - - while (result1 != null) - { - foreach (var e in result1.Entry) - { - Patient p = (Patient)e.Resource; - Console.WriteLine( - $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); - } - result1 = client.Continue(result1, PageDirection.Next); - } - - Console.WriteLine("Test Completed"); - } - - [TestMethod] - [TestCategory("IntegrationTest")] - public async Task SearchUsingPostWithCriteria_SyncContinue_SearchReturnedHttpClient() - { - using (var client = new FhirClient(_endpoint)) - { - client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; - await searchUsingPostWithCriteria(client); - } - } - - - private static async Task searchUsingPostWithCriteria(BaseFhirClient client) - { - var result1 = await client.SearchUsingPostAsync(new[] { "family=Donald" }, pageSize: 5); - - Assert.IsTrue(result1.Entry.Count >= 1); - - while (result1 != null) - { - foreach (var e in result1.Entry) - { - Patient p = (Patient)e.Resource; - Console.WriteLine( - $"NAME: {p.Name[0].Given.FirstOrDefault()} {p.Name[0].Family.FirstOrDefault()}"); - } - result1 = client.Continue(result1, PageDirection.Next); + result1 = await client.ContinueAsync(result1, PageDirection.Next); } Console.WriteLine("Test Completed"); @@ -282,14 +217,12 @@ public async Task SearchWithCriteria_AsyncContinue_SearchReturnedHttpClient() using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; - await searchWithCriteriaAsynContinue(client); + client.Settings.ReturnPreference = ReturnPreference.Representation; + await searchWithCriteriaAsyncContinue(client); } - - } - private static async Task searchWithCriteriaAsynContinue(BaseFhirClient client) + private static async Task searchWithCriteriaAsyncContinue(BaseFhirClient client) { var result1 = await client.SearchAsync(new[] { "family=Donald" }, null, 1); @@ -317,7 +250,7 @@ public async Task SearchUsingPostWithCriteria_AsyncContinue_SearchReturnedHttpCl using (var client = new FhirClient(_endpoint)) { client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; await searchUsingPostAsyncContinue(client); } } diff --git a/src/Hl7.Fhir.STU3/CompatibilitySuppressions.xml b/src/Hl7.Fhir.STU3/CompatibilitySuppressions.xml index d2942db438..3a1127a17b 100644 --- a/src/Hl7.Fhir.STU3/CompatibilitySuppressions.xml +++ b/src/Hl7.Fhir.STU3/CompatibilitySuppressions.xml @@ -64,6 +64,48 @@ lib/net8.0/Hl7.Fhir.STU3.dll true + + CP0002 + M:Hl7.Fhir.Model.ElementDefinition.get_Name + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Model.ElementDefinition.set_Name(System.String) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Model.ValueSet.get_Define + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Model.ValueSet.set_Define(System.String) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.CapabilityStatement(Hl7.Fhir.Rest.BaseFhirClient,System.Nullable{Hl7.Fhir.Rest.SummaryType}) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Rest.FhirClientOperationsExtensions.Meta(Hl7.Fhir.Rest.BaseFhirClient,Hl7.Fhir.Model.ResourceType) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -71,6 +113,13 @@ lib/net8.0/Hl7.Fhir.STU3.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoDeserializerSettings) @@ -85,6 +134,13 @@ lib/net8.0/Hl7.Fhir.STU3.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirJsonPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirJsonPocoSerializer.#ctor(Hl7.Fhir.Serialization.FhirJsonPocoSerializerSettings) @@ -113,6 +169,34 @@ lib/net8.0/Hl7.Fhir.STU3.dll true + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(Hl7.Fhir.Introspection.ModelInspector) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly,Hl7.Fhir.Serialization.FhirXmlPocoDeserializerSettings) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + + + CP0002 + M:Hl7.Fhir.Serialization.FhirXmlPocoDeserializer.#ctor(System.Reflection.Assembly) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + CP0002 M:Hl7.Fhir.Serialization.FhirXmlPocoSerializer.#ctor(Hl7.Fhir.Specification.FhirRelease) @@ -253,6 +337,13 @@ lib/net8.0/Hl7.Fhir.STU3.dll true + + CP0002 + M:Hl7.Fhir.Specification.Terminology.ValueSetExpander.Expand(Hl7.Fhir.Model.ValueSet) + lib/net8.0/Hl7.Fhir.STU3.dll + lib/net8.0/Hl7.Fhir.STU3.dll + true + CP0007 T:Hl7.Fhir.Serialization.FhirJsonSerializer diff --git a/src/Hl7.Fhir.STU3/Model/ElementDefinition.cs b/src/Hl7.Fhir.STU3/Model/ElementDefinition.cs index b26b6dc356..455e466f82 100644 --- a/src/Hl7.Fhir.STU3/Model/ElementDefinition.cs +++ b/src/Hl7.Fhir.STU3/Model/ElementDefinition.cs @@ -49,18 +49,6 @@ string DebuggerDisplay } } - [NotMapped] - [IgnoreDataMemberAttribute] - [Obsolete("Property was renamed to SliceName", true)] - public string Name - { - get { return SliceName; } - set - { - SliceName = value; - } - } - // http://blogs.msdn.com/b/jaredpar/archive/2011/03/18/debuggerdisplay-attribute-best-practices.aspx [DebuggerDisplay(@"\{{DebuggerDisplay,nq}}")] public partial class DiscriminatorComponent diff --git a/src/Hl7.Fhir.STU3/Model/ValueSet.cs b/src/Hl7.Fhir.STU3/Model/ValueSet.cs index 0abf933bb2..dba6783a8d 100644 --- a/src/Hl7.Fhir.STU3/Model/ValueSet.cs +++ b/src/Hl7.Fhir.STU3/Model/ValueSet.cs @@ -19,9 +19,6 @@ namespace Hl7.Fhir.Model { public partial class ValueSet : Hl7.Fhir.Model.DomainResource { - [Obsolete("This property was renamed in DSTU2 to CodeSystem, and in DSTU3 out of the class entirely to the CodeSystem resource", true)] - public string? Define { get; set; } - [NotMapped] public bool HasExpansion => Expansion != null; diff --git a/src/Hl7.Fhir.Shared.Tests/Rest/FhirClientTests.cs b/src/Hl7.Fhir.Shared.Tests/Rest/FhirClientTests.cs index 674c3d764d..abf6b91286 100644 --- a/src/Hl7.Fhir.Shared.Tests/Rest/FhirClientTests.cs +++ b/src/Hl7.Fhir.Shared.Tests/Rest/FhirClientTests.cs @@ -85,7 +85,7 @@ internal static void CreateItems() var client = new FhirClient(TestEndpoint); client.Settings.PreferredFormat = ResourceFormat.Json; - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; + client.Settings.ReturnPreference = ReturnPreference.Representation; var pat = new Patient() { @@ -120,11 +120,11 @@ internal static void CreateItems() // Create the patient Console.WriteLine($"Upserting patient {PATIENTID}."); - Patient p = client.Update(pat); + Patient p = client.UpdateAsync(pat).WaitResult(); Assert.IsNotNull(p); Console.WriteLine($"Upserting location {LOCATIONID}."); - Location l = client.Update(loc); + Location l = client.UpdateAsync(loc).WaitResult(); Assert.IsNotNull(l); } @@ -149,7 +149,7 @@ public async Tasks.Task FetchConformanceHttpClient() Assert.AreEqual(CapabilityStatement.RestfulCapabilityMode.Server, entry.Rest[0].Mode.Value); Assert.AreEqual("200", client.LastResult.Status); - entry = client.CapabilityStatement(SummaryType.True); + entry = await client.CapabilityStatementAsync(SummaryType.True); Assert.IsNull(entry.Text); // DSTU2 has this property as not include as part of the summary (that would be with SummaryType.Text) Assert.IsNotNull(entry); @@ -182,7 +182,7 @@ public async Tasks.Task CondionalPatchHttpClient() var patchparams = new Parameters(); patchparams.AddAddPatchParameter("Patient", "birthdate", new Date("1930-01-01")); var condition = new SearchParams().Where("name=Donald"); - await client.PatchAsync(condition, patchparams); + await client.ConditionalPatchAsync(condition, patchparams); } [TestMethod(), TestCategory("FhirClient"), TestCategory("IntegrationTest")] @@ -207,10 +207,10 @@ public async Tasks.Task ReadWithCompressionReceive() [TestMethod, TestCategory("FhirClient"), TestCategory("IntegrationTest")] [ExpectedException(typeof(FhirOperationException))] - public void ReadWrongResourceTypeHttpClient() + public async Tasks.Task ReadWrongResourceTypeHttpClient() { using var client = new FhirClient(TestEndpoint); - var l = client.Read(LOCATIONIDEP); + var l = await client.ReadAsync(LOCATIONIDEP); Trace.WriteLine(l); } @@ -226,7 +226,7 @@ public async Tasks.Task ReadHttpClient() Assert.AreEqual(LOCATIONID, loc.Id); Assert.IsNotNull(loc.Meta.VersionId); - var loc2 = client.Read(ResourceIdentity.Build("Location", LOCATIONID, loc.Meta.VersionId)); + var loc2 = await client.ReadAsync(ResourceIdentity.Build("Location", LOCATIONID, loc.Meta.VersionId)); Assert.IsNotNull(loc2); Assert.AreEqual(loc2.Id, loc.Id); Assert.AreEqual(loc2.Meta.VersionId, loc.Meta.VersionId); @@ -248,7 +248,7 @@ public async Tasks.Task ReadHttpClient() Assert.AreEqual(await jsonSer.SerializeToStringAsync(loc), await jsonSer.SerializeToStringAsync(loc3)); - var loc4 = client.Read(loc.ResourceIdentity()); + var loc4 = await client.ReadAsync(loc.ResourceIdentity()); Assert.IsNotNull(loc4); Assert.AreEqual(await jsonSer.SerializeToStringAsync(loc), await jsonSer.SerializeToStringAsync(loc4)); @@ -256,16 +256,16 @@ public async Tasks.Task ReadHttpClient() [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void ReadRelativeHttpClient() + public async Tasks.Task ReadRelativeHttpClient() { using FhirClient client = new FhirClient(TestEndpoint); - var loc = client.Read(new Uri(LOCATIONIDEP, UriKind.Relative)); + var loc = await client.ReadAsync(new Uri(LOCATIONIDEP, UriKind.Relative)); Assert.IsNotNull(loc); Assert.AreEqual("Den Burg", loc.Address.City); var ri = ResourceIdentity.Build(TestEndpoint, "Location", LOCATIONID); - loc = client.Read(ri); + loc = await client.ReadAsync(ri); Assert.IsNotNull(loc); Assert.AreEqual("Den Burg", loc.Address.City); } @@ -276,7 +276,7 @@ public async Tasks.Task SearchHttpClient() { using var client = new FhirClient(TestEndpoint); - var result = client.Search(); + var result = await client.SearchAsync(); Assert.IsNotNull(result); result = await client.SearchAsync(pageSize: 2); @@ -287,43 +287,43 @@ public async Tasks.Task SearchHttpClient() [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] [ExpectedException(typeof(ArgumentException))] - public void SearchInvalidCriteriaHttpClient() + public async Tasks.Task SearchInvalidCriteriaHttpClient() { using var client = new FhirClient(TestEndpoint); - var result = client.Search(new string[] { "test" }); + var result = await client.SearchAsync(["test"]); } [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] [DataRow(ResourceFormat.Xml)] [DataRow(ResourceFormat.Json)] - public void PagingHttpClient(ResourceFormat format) + public async Tasks.Task PagingHttpClient(ResourceFormat format) { using var client = new FhirClient(TestEndpoint); client.Settings.PreferredFormat = format; - var result = client.Search(pageSize: 2); + var result = await client.SearchAsync(pageSize: 2); Assert.IsNotNull(result); Assert.AreEqual(2,result.Entry.Count); var firstId = result.Entry.First().Resource.Id; // Browse forward - result = client.Continue(result); + result = await client.ContinueAsync(result); Assert.IsNotNull(result); var nextId = result.Entry.First().Resource.Id; Assert.AreNotEqual(firstId, nextId); // Browse to first - result = client.Continue(result, PageDirection.First); + result = await client.ContinueAsync(result, PageDirection.First); Assert.IsNotNull(result); var prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); // Forward, then backwards - result = client.Continue(result, PageDirection.Next); + result = await client.ContinueAsync(result, PageDirection.Next); Assert.IsNotNull(result); - result = client.Continue(result, PageDirection.Previous); + result = await client.ContinueAsync(result, PageDirection.Previous); Assert.IsNotNull(result); prevId = result.Entry.First().Resource.Id; Assert.AreEqual(firstId, prevId); @@ -334,7 +334,7 @@ public void PagingHttpClient(ResourceFormat format) public async Tasks.Task CreateAndFullRepresentationHttpClient() { using var client = new FhirClient(TestEndpoint); - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; // which is also the default + client.Settings.ReturnPreference = ReturnPreference.Representation; // which is also the default var pat = await client.ReadAsync(PATIENTIDEP); ResourceIdentity ri = pat.ResourceIdentity().WithBase(client.Endpoint); @@ -343,7 +343,7 @@ public async Tasks.Task CreateAndFullRepresentationHttpClient() var patC = await client.CreateAsync(pat); Assert.IsNotNull(patC); - client.Settings.PreferredReturn = Prefer.ReturnMinimal; + client.Settings.ReturnPreference = ReturnPreference.Minimal; patC = await client.CreateAsync(pat); Assert.IsNull(patC); @@ -355,7 +355,7 @@ public async Tasks.Task CreateAndFullRepresentationHttpClient() } // Now validate this resource - client.Settings.PreferredReturn = Prefer.ReturnRepresentation; // which is also the default + client.Settings.ReturnPreference = ReturnPreference.Representation; // which is also the default var p = new Parameters(); p.Add("resource", pat); var oI = await client.InstanceOperationAsync(ri.WithoutVersion(), "validate", p); @@ -374,7 +374,7 @@ public async Tasks.Task CreateEditDeleteHttpClient() private async Tasks.Task testCreateEditDeleteAsync(BaseFhirClient client) { - var pat = client.Read(PATIENTIDEP); + var pat = await client.ReadAsync(PATIENTIDEP); pat.Id = null; pat.Identifier.Clear(); pat.Identifier.Add(new Identifier("http://hl7.org/test/2", "99999")); @@ -394,7 +394,7 @@ private async Tasks.Task testCreateEditDeleteAsync(BaseFhirClient client) Assert.AreEqual(2, fe2.Identifier.Count); fe.Identifier.Add(new Identifier("http://hl7.org/test/3", "3141592")); - var fe3 = client.Update(fe); + var fe3 = await client.UpdateAsync(fe); Assert.IsNotNull(fe3); Assert.AreEqual(3, fe3.Identifier.Count); @@ -502,7 +502,7 @@ public async Tasks.Task ManipulateMetaHttpClient() verifyMeta(par, false, key); // Should be present when doing type Meta() - par = client.Meta(ResourceType.Patient); // Sync for a change + par = await client.MetaAsync(ResourceType.Patient); verifyMeta(par, false, key); // Should be present when doing System Meta() @@ -516,14 +516,14 @@ public async Tasks.Task ManipulateMetaHttpClient() newMeta.Security.Add(new Coding("http://mysystem.com/sec", "5678-" + key)); newMeta.Tag.Add(new Coding("http://mysystem.com/tag", "sometag2-" + key)); - client.AddMeta(loc, newMeta); + await client.AddMetaAsync(loc, newMeta); var pat3 = await client.ReadAsync(loc); // New and old meta should be present on instance verifyMeta(pat3.Meta, true, key); // New and old meta should be present on Meta() - par = client.Meta(loc); + par = await client.MetaAsync(loc); verifyMeta(par, true, key); // New and old meta should be present when doing type Meta() @@ -643,7 +643,7 @@ static async Tasks.Task check(HttpClientEventHandler handler, FhirClient client) Assert.IsTrue(bodyText.Contains("("Patient/" + PATIENTID); + var pat = await client.ReadAsync("Patient/" + PATIENTID); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -690,7 +690,7 @@ public void CallsCallbacksHttpClient() Assert.IsTrue(bodyText.Contains("("Patient/" + PATIENTID); + var pat = await client.ReadAsync("Patient/" + PATIENTID); Assert.IsTrue(calledBefore); Assert.IsNotNull(status); Assert.IsNotNull(body); @@ -730,7 +730,7 @@ public void CallsCallbacksHttpClient() Assert.IsTrue(bodyText.Contains("("Patient/" + PATIENTID); + var result = await client.ReadAsync("Patient/" + PATIENTID); var orig = result.Name[0].FamilyElement.Value; @@ -868,7 +868,7 @@ public async Tasks.Task TestCreatingBinaryResourceHttpClient() public async Tasks.Task TestPreferOperationOutcome() { FhirClient client = new FhirClient(TestEndpoint); - client.Settings.PreferredReturn = Prefer.OperationOutcome; + client.Settings.ReturnPreference = ReturnPreference.OperationOutcome; var pat = new Patient() { diff --git a/src/Hl7.Fhir.Shared.Tests/Rest/OperationsTests.cs b/src/Hl7.Fhir.Shared.Tests/Rest/OperationsTests.cs index 0410bc5f28..eff7a063c8 100644 --- a/src/Hl7.Fhir.Shared.Tests/Rest/OperationsTests.cs +++ b/src/Hl7.Fhir.Shared.Tests/Rest/OperationsTests.cs @@ -93,13 +93,13 @@ public async Task InvokeLookupCodeHttpClient() [TestMethod] [TestCategory("FhirClient"), TestCategory("IntegrationTest")] - public void InvokeValidateCodeByIdHttpClient() + public async Task InvokeValidateCodeByIdHttpClient() { using var client = new FhirClient(FhirClientTests.TerminologyEndpoint); var coding = new Coding("http://snomed.info/sct", "4322002"); - var result = client.ValidateCode("c80-facilitycodes", coding: coding, @abstract: new FhirBoolean(false)); + var result = await client.ValidateCodeAsync("c80-facilitycodes", coding: coding, @abstract: new FhirBoolean(false)); Assert.IsTrue(result.Result?.Value == true); } @@ -127,7 +127,7 @@ public async Task InvokeValidateCodeWithVSHttpClient() var vs = await client.ReadAsync("ValueSet/c80-facilitycodes"); Assert.IsNotNull(vs); - var result = client.ValidateCode(valueSet: vs, coding: coding); + var result = await client.ValidateCodeAsync(valueSet: vs, coding: coding); Assert.IsTrue(result.Result?.Value == true); } diff --git a/src/Hl7.Fhir.Shared.Tests/Rest/SearchAsyncTests.cs b/src/Hl7.Fhir.Shared.Tests/Rest/SearchAsyncTests.cs index 4de4a0226a..32dc0ed7b0 100644 --- a/src/Hl7.Fhir.Shared.Tests/Rest/SearchAsyncTests.cs +++ b/src/Hl7.Fhir.Shared.Tests/Rest/SearchAsyncTests.cs @@ -38,7 +38,7 @@ public async Task Search_UsingSearchParams_SearchReturnedHttpClient(string metho #pragma warning disable CS0618 // Type or member is obsolete var result1 = method switch { - "GET" => client.Search(srch), + "GET" => await client.SearchAsync(srch), "ASYNC" => await client.SearchAsync(srch), "POST" => await client.SearchUsingPostAsync(srch), _ => throw new Exception() @@ -80,43 +80,27 @@ public async Task SearchMultiple_UsingSearchParams_SearchReturnedHttpClient() var results = await Task.WhenAll(tasks); results.All(r => r is not null).Should().BeTrue(); } - - [TestMethod] - [TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public async Task SearchWithCriteria_SyncContinue_SearchReturnedHttpClient() - { - using var client = new FhirClient(ENDPOINT); - - var result1 = await client.SearchAsync(new[] { "family=Donald" }); - await check(client, result1); - } - - [TestMethod] - [Ignore("FS does not like to continue after a search with post - getting GONE")] - [TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public async Task SearchUsingPostWithCriteria_SyncContinue_SearchReturnedHttpClient() - { - using var client = new FhirClient(ENDPOINT); - var result1 = await client.SearchUsingPostAsync(new[] { "family=Donald" }, pageSize: 5); - await check(client, result1); - } [TestMethod] [TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public async Task SearchWithCriteria_AsyncContinue_SearchReturnedHttpClient() + [DataRow(null)] + [DataRow(5)] + public async Task SearchWithCriteria_AsyncContinue_SearchReturnedHttpClient(int? pageSize) { using var client = new FhirClient(ENDPOINT); - var result1 = await client.SearchAsync(new[] { "family=Donald" }, null, 5); + var result1 = await client.SearchAsync(new[] { "family=Donald" }, null, pageSize); await check(client, result1); } [TestMethod] [Ignore("FS does not like to continue after a search with post - getting GONE")] [TestCategory("IntegrationTest"), TestCategory("FhirClient")] - public async Task SearchUsingPostWithCriteria_AsyncContinue_SearchReturnedHttpClient() + [DataRow(1)] + [DataRow(5)] + public async Task SearchUsingPostWithCriteria_AsyncContinue_SearchReturnedHttpClient(int pageSize) { using var client = new FhirClient(ENDPOINT); - var result1 = await client.SearchUsingPostAsync(new[] { "family=Donald" }, null, 1); + var result1 = await client.SearchUsingPostAsync(new[] { "family=Donald" }, null, pageSize); await check(client, result1); } } diff --git a/src/Hl7.Fhir.Shims.Base/Specification/Terminology/ValueSetExpander.cs b/src/Hl7.Fhir.Shims.Base/Specification/Terminology/ValueSetExpander.cs index 6d0bf8394d..b0d7aa25d5 100644 --- a/src/Hl7.Fhir.Shims.Base/Specification/Terminology/ValueSetExpander.cs +++ b/src/Hl7.Fhir.Shims.Base/Specification/Terminology/ValueSetExpander.cs @@ -45,9 +45,6 @@ public ValueSetExpander() : this(ValueSetExpanderSettings.CreateDefault()) // nothing } - [Obsolete("ValueSetExpander now works best with asynchronous resolvers. Use ExpandAsync() instead.")] - public void Expand(ValueSet source) => TaskHelper.Await(() => ExpandAsync(source)); - /// /// Expand the include and exclude filters. Creates the /// diff --git a/src/Hl7.Fhir.Shims.R4AndUp/Specification/Source/ZipSource.cs b/src/Hl7.Fhir.Shims.R4AndUp/Specification/Source/ZipSource.cs index 4f1bfe010f..a0b8fc67ec 100644 --- a/src/Hl7.Fhir.Shims.R4AndUp/Specification/Source/ZipSource.cs +++ b/src/Hl7.Fhir.Shims.R4AndUp/Specification/Source/ZipSource.cs @@ -64,11 +64,7 @@ public static ZipSource CreateValidationSource() } #region IConformanceSource - // Obsoleted since 2022-11-21, EK - [Obsolete("ZipSource itself implements IConformanceSource, use that implementation instead of this property.")] - public IConformanceSource Source => this; - - + public IEnumerable ListResourceUris(ResourceType? filter = null) => FileSource.ListResourceUris(filter?.GetLiteral()); public IEnumerable FindConceptMaps(string? sourceUri = null, string? targetUri = null) => diff --git a/src/Hl7.Fhir.Shims.STU3AndUp/Rest/FhirClientOperationsExtensions.cs b/src/Hl7.Fhir.Shims.STU3AndUp/Rest/FhirClientOperationsExtensions.cs index ea752fe77f..ba77065320 100644 --- a/src/Hl7.Fhir.Shims.STU3AndUp/Rest/FhirClientOperationsExtensions.cs +++ b/src/Hl7.Fhir.Shims.STU3AndUp/Rest/FhirClientOperationsExtensions.cs @@ -24,12 +24,6 @@ public static async Task MetaAsync(this BaseFhirClient client, ResourceTyp return FhirClientOperations.ExtractMeta(FhirClientOperations.OperationResult( await client.TypeOperationAsync(RestOperation.META, type.GetLiteral(), useGet: true, ct:ct).ConfigureAwait(false))); } - - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static Meta Meta(this BaseFhirClient client, ResourceType type) - { - return MetaAsync(client, type).WaitResult(); - } #endregion #region Conformance @@ -43,16 +37,6 @@ public static Task CapabilityStatementAsync(this BaseFhirCl var tx = new TransactionBuilder(client.Endpoint).CapabilityStatement(summary).ToBundle(); return client.executeAsync(tx, HttpStatusCode.OK, ct); } - - /// - /// Get a conformance statement for the system - /// - /// A Conformance resource. Throws an exception if the operation failed. - [Obsolete("Synchronous use of the FhirClient is strongly discouraged, use the asynchronous call instead.")] - public static CapabilityStatement CapabilityStatement(this BaseFhirClient client, SummaryType? summary = null) - { - return client.CapabilityStatementAsync(summary).WaitResult(); - } #endregion } } diff --git a/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirJsonPocoDeserializer.cs b/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirJsonPocoDeserializer.cs index 29603b160d..ce2f3ac6c4 100644 --- a/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirJsonPocoDeserializer.cs +++ b/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirJsonPocoDeserializer.cs @@ -1,9 +1,6 @@ #nullable enable -using Hl7.Fhir.Introspection; using Hl7.Fhir.Model; -using System; -using System.Reflection; namespace Hl7.Fhir.Serialization { @@ -19,30 +16,6 @@ public FhirJsonPocoDeserializer() : base(ModelInfo.ModelInspector) { } /// /// Deserialization settings public FhirJsonPocoDeserializer(FhirJsonConverterOptions settings) : base(ModelInfo.ModelInspector, settings) { } - - /// - [Obsolete("Please use FhirJsonPocoDeserializer() if you are using a single version of FHIR or BaseFhirJsonPocoDeserializer if you want to use multiple versions of FHIR")] - public FhirJsonPocoDeserializer(Assembly assembly) : base(assembly) - { - } - - /// - [Obsolete("Please use FhirJsonPocoDeserializer() if you are using a single version of FHIR or BaseFhirJsonPocoDeserializer if you want to use multiple versions of FHIR")] - public FhirJsonPocoDeserializer(ModelInspector inspector) : base(inspector) - { - } - - /// - [Obsolete("Please use FhirJsonPocoDeserializer() if you are using a single version of FHIR or BaseFhirJsonPocoDeserializer if you want to use multiple versions of FHIR")] - public FhirJsonPocoDeserializer(Assembly assembly, FhirJsonConverterOptions settings) : base(assembly, settings) - { - } - - /// - [Obsolete("Please use FhirJsonPocoDeserializer() if you are using a single version of FHIR or BaseFhirJsonPocoDeserializer if you want to use multiple versions of FHIR")] - public FhirJsonPocoDeserializer(ModelInspector inspector, FhirJsonConverterOptions settings) : base(inspector, settings) - { - } } } diff --git a/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirXmlPocoDeserializer.cs b/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirXmlPocoDeserializer.cs index 9ce9cc4095..f606b4241f 100644 --- a/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirXmlPocoDeserializer.cs +++ b/src/Hl7.Fhir.Shims.STU3AndUp/Serialization/FhirXmlPocoDeserializer.cs @@ -24,30 +24,6 @@ public FhirXmlPocoDeserializer() : base(ModelInfo.ModelInspector) public FhirXmlPocoDeserializer(FhirXmlPocoDeserializerSettings settings) : base(ModelInfo.ModelInspector, settings) { } - - /// - [Obsolete("Please use FhirXmlPocoDeserializer() if you are using a single version of BaseFhirXmlPocoDeserializer if you want to add custom model information")] - public FhirXmlPocoDeserializer(Assembly assembly) : base(assembly) - { - } - - /// - [Obsolete("Please use FhirXmlPocoDeserializer() if you are using a single version of FHIR or BaseFhirXmlPocoDeserializer if you want to add custom model information")] - public FhirXmlPocoDeserializer(ModelInspector inspector) : base(inspector) - { - } - - /// - [Obsolete("Please use FhirXmlPocoDeserializer() if you are using a single version of BaseFhirXmlPocoDeserializer if you want to add custom model information")] - public FhirXmlPocoDeserializer(Assembly assembly, FhirXmlPocoDeserializerSettings settings) : base(assembly, settings) - { - } - - /// - [Obsolete("Please use FhirXmlPocoDeserializer() if you are using a single version of BaseFhirXmlPocoDeserializer if you want to add custom model information")] - public FhirXmlPocoDeserializer(ModelInspector inspector, FhirXmlPocoDeserializerSettings settings) : base(inspector, settings) - { - } } } diff --git a/src/Hl7.Fhir.Support.Poco.Tests/Rest/FhirClientMockTests.cs b/src/Hl7.Fhir.Support.Poco.Tests/Rest/FhirClientMockTests.cs index 858c4f81d6..00a93b9887 100644 --- a/src/Hl7.Fhir.Support.Poco.Tests/Rest/FhirClientMockTests.cs +++ b/src/Hl7.Fhir.Support.Poco.Tests/Rest/FhirClientMockTests.cs @@ -162,11 +162,7 @@ private static bool findInAcceptHeader(HttpHeaderValueCollection makeMessage(settings, interaction: interaction); } -#pragma warning disable CS0618 // Type or member is obsolete - [TestMethod] - [DataRow(Prefer.ReturnRepresentation, ReturnPreference.Representation, false)] - [DataRow(Prefer.OperationOutcome, ReturnPreference.OperationOutcome, false)] - [DataRow(Prefer.ReturnMinimal, ReturnPreference.Minimal, false)] - [DataRow(Prefer.RespondAsync, null, true)] - [DataRow(null, null, false)] - public void TestConvertPreferredReturn(Prefer? setting, ReturnPreference? pref, bool isAsync) - { - var settings = new FhirClientSettings { PreferredReturn = setting }; - settings.ReturnPreference.Should().Be(pref); - settings.UseAsync.Should().Be(isAsync); - } - - [TestMethod] - [DataRow(null, false, null)] - [DataRow(null, true, Prefer.RespondAsync)] - [DataRow(ReturnPreference.Minimal, false, Prefer.ReturnMinimal)] - [DataRow(ReturnPreference.Representation, false, Prefer.ReturnRepresentation)] - [DataRow(ReturnPreference.OperationOutcome, false, Prefer.OperationOutcome)] - [DataRow(ReturnPreference.OperationOutcome, true, Prefer.RespondAsync)] - public void TestConvertReturnPreference(ReturnPreference? pref, bool isAsync, Prefer? setting) - { - var settings = new FhirClientSettings { ReturnPreference = pref, UseAsync = isAsync }; - settings.PreferredReturn.Should().Be(setting); - } -#pragma warning restore CS0618 // Type or member is obsolete - - [TestMethod] - [DataRow(false, DecompressionMethods.None)] - [DataRow(true, DecompressionMethods.GZip)] - public void ConvertCompressionRequestBody(bool compress, DecompressionMethods method) - { -#pragma warning disable CS0618 // Type or member is obsolete - var settings = new FhirClientSettings { CompressRequestBody = compress }; -#pragma warning restore CS0618 // Type or member is obsolete - settings.RequestBodyCompressionMethod.Should().Be(method); - } - - [TestMethod] - [DataRow(DecompressionMethods.None, false)] - [DataRow(DecompressionMethods.GZip, true)] - [DataRow(DecompressionMethods.Deflate, true)] - public void ConvertRequestBodyCompression(DecompressionMethods method, bool compress) - { - var settings = new FhirClientSettings { RequestBodyCompressionMethod = method }; -#pragma warning disable CS0618 // Type or member is obsolete - settings.CompressRequestBody.Should().Be(compress); -#pragma warning restore CS0618 // Type or member is obsolete - } - [TestMethod] public void TestRequestUrl() {