Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API to transform all children nodes #194

Closed
pleonex opened this issue Nov 16, 2023 · 0 comments · Fixed by #201
Closed

Improve API to transform all children nodes #194

pleonex opened this issue Nov 16, 2023 · 0 comments · Fixed by #201
Milestone

Comments

@pleonex
Copy link
Member

pleonex commented Nov 16, 2023

Transform children nodes

var overlays9 = context.GetSystemNode("overlays9");
foreach (var overlay in overlays9.Children) {
    _ = overlay.TransformWith(compressionConverter);
}

Proposal:

  • TransformChildrenWith(bool recursive)
  • Extension method for LINQ (see below)

Transform children nodes with filter

var overlays9 = context.GetSystemNode("overlays9");
foreach (var overlay in overlays9.Children.Where(n => n.Name.StartsWith("ov9"))) {
    _ = overlay.TransformWith(compressionConverter);
}

Proposals:

  • Extension method for LINQ: overlays9.Children.Where(...).TransformWith<T>()
  • Do the same for NodeContainerFormat so it works without nodes.
    • Maybe not needed if they do containerFormat.Root.Children
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant