Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Redesign IUpdateManager interface and implementation #14

Open
tuscen opened this issue Mar 2, 2018 · 0 comments
Open

Redesign IUpdateManager interface and implementation #14

tuscen opened this issue Mar 2, 2018 · 0 comments
Labels

Comments

@tuscen
Copy link
Member

tuscen commented Mar 2, 2018

Scoped lifetime of IUpdateManager<TBot> and polling functionality built in it don't play well together. An entity that performs polling should be a singleton.

IUpdateManager<TBot> functionality should be split to two interfaces:

  • IUpdateDispatcher<TBot> that performs dispatching and could has either scoped or transient lifetime
  • An entity that performs actual polling and has dependency on a factory that creates IUpdateDisptacher<TBot> instance and has singleton lifetime so it correctly incapsulates update offset
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant