Skip to content

chore: add TryGetValue extensions for bindings - #156

Merged
VisualBean merged 2 commits into
mainfrom
alex/bindinghelpers
Mar 26, 2024
Merged

VisualBean merged 2 commits into
mainfrom
alex/bindinghelpers

Conversation

@VisualBean

@VisualBean VisualBean commented Mar 26, 2024 •

Copy link
Copy Markdown
Contributor

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
@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