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

Helper for finding LabelValuePairs by language + label #44

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

donaldgray
Copy link
Member

Added TryGetValue() helper method that makes it easier to lookup List<LableValuePair> by label and language. Followed same approach as `Dictionary<T1, T2>.TryGetValue().

e.g.

if (manifest.Metadata.TryGetValue("en", "My Metadata", out var myMedataValues))
{
  // do something with myMedataValues
}

Also added null check in SanitiseHtml() method ecountered during testing.

@donaldgray donaldgray merged commit a7174e3 into main Nov 16, 2023
1 check passed
@donaldgray donaldgray deleted the feature/lvp_helper branch November 16, 2023 14:19
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.

None yet

1 participant