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

rebase and improve PR #741 - ReadGroups #913

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

gbirchmeier
Copy link
Member

@gbirchmeier gbirchmeier commented Dec 20, 2024

This was a cool submission, @NoviProg! I cleaned it up a little bit, and also promoted it to being a full-fledged FieldMap member instead of an extension.

( closes #741 )

Summary:

It adds a FieldMap method ReadGroups to allow you to iterate through all the elements of a repeating group.

Here is a simple example to iterate through all the lines of a News message:

    foreach (var item in msg.ReadGroups<News.LinesOfTextGroup>(Tags.NoLinesOfText)) {
        System.Console.WriteLine(item.Text.Value);
    }

I wish there was a way to eliminate either the template param or the tag param, but I couldn't crack it.

I will add an example to the web docs also.

NoviProg and others added 3 commits December 18, 2024 15:58
@gbirchmeier
Copy link
Member Author

@NoviProg let me know if you want to have your name on our Contributors page (and if yes, tell me what your name is!)

no reason for it to be an extension
@gbirchmeier gbirchmeier force-pushed the rebase-741-ReadGroups branch from 8986199 to 10c4c44 Compare December 20, 2024 21:08
@gbirchmeier gbirchmeier merged commit 8f4f5c9 into connamara:master Dec 20, 2024
2 checks passed
@gbirchmeier gbirchmeier deleted the rebase-741-ReadGroups branch December 20, 2024 21:43
@NoviProg
Copy link
Contributor

Thank you very much for your feedback. I'm glad you accepted my pull request. That's enough for me.

gbirchmeier added a commit that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants