Skip to content

Commit

Permalink
Made Code<T> a subclass of Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasdejong committed Dec 17, 2024
1 parent 32c8bbf commit 3aba1f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Hl7.Fhir.Base/Model/CodeOfT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace Hl7.Fhir.Model
[FhirType("codeOfT")]
[DataContract]
[System.Diagnostics.DebuggerDisplay(@"\{Value={Value}}")]
public class Code<T> : PrimitiveType, INullableValue<T>, ISystemAndCode where T : struct, Enum
public class Code<T> : Code, INullableValue<T>, ISystemAndCode where T : struct, Enum
{
static Code()
{
Expand All @@ -66,7 +66,7 @@ public Code(T? value)
// Primitive value of element
[FhirElement("value", IsPrimitiveValue = true, XmlSerialization = XmlRepresentation.XmlAttr, InSummary = true, Order = 30)]
[DataMember]
public T? Value
new public T? Value
{
get => TryParseObjectValue(out var value)
? value
Expand Down Expand Up @@ -94,7 +94,7 @@ internal bool TryParseObjectValue(out T? value)

string ISystemAndCode.Code => Value?.GetLiteral();

public S.Code ToSystemCode() => new(Value?.GetSystem(), Value?.GetLiteral(), display: null, version: null);
new public S.Code ToSystemCode() => new(Value?.GetSystem(), Value?.GetLiteral(), display: null, version: null);

public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
Expand Down

0 comments on commit 3aba1f4

Please sign in to comment.