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

feature: detect subscription support in provider #1015

Closed
simon-jentzsch opened this issue Sep 3, 2017 · 0 comments
Closed

feature: detect subscription support in provider #1015

simon-jentzsch opened this issue Sep 3, 2017 · 0 comments
Assignees
Labels
Discussion Enhancement Includes improvements or optimizations
Projects

Comments

@simon-jentzsch
Copy link
Contributor

simon-jentzsch commented Sep 3, 2017

currently in a lot of lines in the code the provider is checked whether is supports subscribe. This is done by simply checking, if the on-function exists

if (provider.on)
   ...
else
   ...

Since we also use different Wrappers, which even dynamically change the inner provider, this means, we must add and delete a function during runtime depending on the inner provider.
I would rather suggest a function supportsSubscription(). This would make it cleaner and easier to implement and even delegate this call to the inner wrapper.

if (provider.supportsSubscription())
   ...
else
   ...
@frozeman frozeman added Discussion Enhancement Includes improvements or optimizations labels Sep 4, 2017
@nivida nivida self-assigned this Aug 9, 2018
@nivida nivida added this to To do in 1.0 Nov 29, 2018
1.0 automation moved this from To do to Done Apr 3, 2019
@nivida nivida mentioned this issue Apr 4, 2019
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Enhancement Includes improvements or optimizations
Projects
No open projects
1.0
  
Done
Development

No branches or pull requests

3 participants