Skip to content

Commit

Permalink
revert some location elements
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovisserFurore committed Nov 14, 2023
1 parent cc1ec0a commit 45dbd22
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ScopedNodeToTypedElementAdapter(IScopedNode node)
_node = node;
}

public string Location => _node.GetLocation();
public string Location => throw new System.NotImplementedException();

public IElementDefinitionSummary Definition => throw new System.NotImplementedException();

Expand Down
3 changes: 0 additions & 3 deletions src/Hl7.Fhir.Base/ElementModel/IScopedNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ namespace Hl7.Fhir.ElementModel
public interface IScopedNode : IBaseElementNavigator<IScopedNode>
{
IScopedNode? Parent { get; }

int? ChildIndex { get; }

}
}

Expand Down
5 changes: 0 additions & 5 deletions src/Hl7.Fhir.Base/ElementModel/IScopedNodeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ namespace Hl7.Fhir.ElementModel
{
public static class IScopedNodeExtensions
{
public static string GetLocation(this IScopedNode node) =>
node.Parent is null ? node.Name : $"{node.Parent.GetLocation()}.{node.Name}{node.index()}"; // TODO: add unittest and verify this is the definition of Location

private static string? index(this IScopedNode node) =>
node.ChildIndex is null ? null : $"[{node.ChildIndex}]";
public static IEnumerable<IScopedNode> Children(this IEnumerable<IScopedNode> nodes, string? name = null) =>
nodes.SelectMany(n => n.Children(name));

Expand Down

0 comments on commit 45dbd22

Please sign in to comment.