diff --git a/src/Hl7.Fhir.Base/ElementModel/Adapters/ScopedNodeToTypedElementAdapter.cs b/src/Hl7.Fhir.Base/ElementModel/Adapters/ScopedNodeToTypedElementAdapter.cs
deleted file mode 100644
index 3d0814c177..0000000000
--- a/src/Hl7.Fhir.Base/ElementModel/Adapters/ScopedNodeToTypedElementAdapter.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2023, 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.Specification;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Hl7.Fhir.ElementModel
-{
- ///
- /// An adapter from to .
- ///
- /// Be careful, this adapter does not implement the and
- /// property.
- ///
- internal class ScopedNodeToTypedElementAdapter : ITypedElement
- {
- private readonly IScopedNode _adaptee;
-
- public ScopedNodeToTypedElementAdapter(IScopedNode adaptee)
- {
- _adaptee = adaptee;
- }
-
- public string Location => throw new System.NotImplementedException();
-
- public IElementDefinitionSummary Definition => throw new System.NotImplementedException();
-
- public string Name => _adaptee.Name;
-
- public string InstanceType => _adaptee.InstanceType;
-
- public object Value => _adaptee.Value;
-
- public IEnumerable Children(string? name = null) =>
- _adaptee.Children(name).Select(n => new ScopedNodeToTypedElementAdapter(n));
- }
-}
-
-#nullable restore
\ No newline at end of file
diff --git a/src/Hl7.Fhir.Base/ElementModel/ElementNodeExtensions.cs b/src/Hl7.Fhir.Base/ElementModel/ElementNodeExtensions.cs
index b228dcfb62..b133dbadb9 100644
--- a/src/Hl7.Fhir.Base/ElementModel/ElementNodeExtensions.cs
+++ b/src/Hl7.Fhir.Base/ElementModel/ElementNodeExtensions.cs
@@ -108,13 +108,6 @@ public static IReadOnlyCollection ChildDefinitions(th
public static ScopedNode ToScopedNode(this ITypedElement node) =>
node as ScopedNode ?? new ScopedNode(node);
-
- ///
- /// Convert a to a .
- ///
- /// An
- ///
- internal static IScopedNode AsScopedNode(this ITypedElement node) => ToScopedNode(node);
}
}
diff --git a/src/Hl7.Fhir.Base/ElementModel/IBaseElementNavigator.cs b/src/Hl7.Fhir.Base/ElementModel/IBaseElementNavigator.cs
index 988ca77f8d..bf8bf0b69b 100644
--- a/src/Hl7.Fhir.Base/ElementModel/IBaseElementNavigator.cs
+++ b/src/Hl7.Fhir.Base/ElementModel/IBaseElementNavigator.cs
@@ -14,7 +14,7 @@
namespace Hl7.Fhir.ElementModel
{
///
- /// The base interface for and ."/>
+ /// The base interface for ."/>
///
///
[Obsolete("WARNING! Intended for internal API usage exclusively, this interface ideally should be kept internal. " +
diff --git a/src/Hl7.Fhir.Base/ElementModel/IScopedNode.cs b/src/Hl7.Fhir.Base/ElementModel/IScopedNode.cs
deleted file mode 100644
index fdd8fab486..0000000000
--- a/src/Hl7.Fhir.Base/ElementModel/IScopedNode.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2023, 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
-
-namespace Hl7.Fhir.ElementModel
-{
- ///
- /// An element within a tree of typed FHIR data with also a parent element.
- ///
- ///
- /// This interface represents FHIR data as a tree of elements, including type information either present in
- /// the instance or derived from fully aware of the FHIR definitions and types
- ///
-#pragma warning disable CS0618 // Type or member is obsolete
- internal interface IScopedNode : IBaseElementNavigator
-#pragma warning restore CS0618 // Type or member is obsolete
- {
- ///
- /// The parent node of this node, or null if this is the root node.
- ///
- IScopedNode? Parent { get; }
- }
-}
-
-#nullable restore
\ No newline at end of file
diff --git a/src/Hl7.Fhir.Base/ElementModel/IScopedNodeExtensions.cs b/src/Hl7.Fhir.Base/ElementModel/IScopedNodeExtensions.cs
deleted file mode 100644
index 09fa7e6641..0000000000
--- a/src/Hl7.Fhir.Base/ElementModel/IScopedNodeExtensions.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2023, 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 System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Hl7.Fhir.ElementModel
-{
- internal static class IScopedNodeExtensions
- {
- ///
- /// Converts a to a .
- ///
- /// An node
- /// An implementation of
- /// Be careful when using this method, the returned does not implement
- /// the methods and .
- ///
- [Obsolete("WARNING! For internal API use only. Turning an IScopedNode into an ITypedElement will cause problems for" +
- "Location and Definitions. Those properties are not implemented using this method and can cause problems " +
- "elsewhere. Please don't use this method unless you know what you are doing.")]
- public static ITypedElement AsTypedElement(this IScopedNode node) =>
- node is ITypedElement ite ? ite : new ScopedNodeToTypedElementAdapter(node);
-
- ///
- /// Returns the parent resource of this node, or null if this node is not part of a resource.
- ///
- ///
- ///
- ///
- public static IEnumerable Children(this IEnumerable nodes, string? name = null) =>
- nodes.SelectMany(n => n.Children(name));
- }
-}
-
-#nullable restore
\ No newline at end of file
diff --git a/src/Hl7.Fhir.Base/ElementModel/ScopedNode.cs b/src/Hl7.Fhir.Base/ElementModel/ScopedNode.cs
index 6373448fa9..7c7390a32e 100644
--- a/src/Hl7.Fhir.Base/ElementModel/ScopedNode.cs
+++ b/src/Hl7.Fhir.Base/ElementModel/ScopedNode.cs
@@ -16,7 +16,7 @@
namespace Hl7.Fhir.ElementModel
{
- public class ScopedNode : ITypedElement, IScopedNode, IAnnotated, IExceptionSource
+ public class ScopedNode : ITypedElement, IAnnotated, IExceptionSource
{
private class Cache
{
@@ -32,7 +32,6 @@ private class Cache
private readonly Cache _cache = new();
public readonly ITypedElement Current;
- private readonly ScopedNode? _parent;
public ScopedNode(ITypedElement wrapped, string? instanceUri = null)
{
@@ -46,7 +45,6 @@ public ScopedNode(ITypedElement wrapped, string? instanceUri = null)
private ScopedNode(ScopedNode parentNode, ScopedNode? parentResource, ITypedElement wrapped, string? fullUrl)
{
Current = wrapped;
- _parent = parentNode;
ExceptionHandler = parentNode.ExceptionHandler;
ParentResource = parentNode.AtResource ? parentNode : parentResource;
@@ -230,24 +228,11 @@ private set
}
}
- ///
-
-
- IScopedNode? IScopedNode.Parent => _parent;
-
///
public IEnumerable