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

chore: add TryGetValue extensions for bindings #156

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Conversation

VisualBean
Copy link
Collaborator

@VisualBean VisualBean commented Mar 26, 2024

About the PR

This PR adds extensions for the AsyncApiBindings dictionary, so fetching specific bindings becomes a lot easier.
So instead of having to do;

server.bindings.TryGetValue("kafka", out var binding);

you can now do

server.bindings.TryGetValue<KafkaServerBinding>(out var binding);

Yes it uses reflection.

Changelog

  • Added TryGetValue extensions.
  • Fixed weird kafka namespace

Related Issues

  • Closes #

@VisualBean VisualBean force-pushed the alex/bindinghelpers branch from 2643bef to 9bfde05 Compare March 26, 2024 00:36
@VisualBean VisualBean merged commit 581f680 into main Mar 26, 2024
7 checks passed
@VisualBean VisualBean deleted the alex/bindinghelpers branch March 26, 2024 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant