Introduce IUpdateReceiver interface as a push model parallel to IYieldingUpdateReceiver pull model.
Move implementation of TelegramBotClientPollingExtensions.ReceiveAsync into DefaultUpdateReceiver
Add ReceiveOptions to configure getUpdatesrequests
Move allowed updates option from IUpdateHandler into ReceiveOptions
Add ReceiveOptions optional parameter into TelegramBotClientPollingExtensions methods
Add Async suffix to IUpdateHandler methods
Make field containing ITelegramBotClient instance private in both IYieldingUpdateReceiver implementations. No need for it to be exposed since the inteface doesn't have it and the only place where it will be exposed is the same where actual impementations are instantiated
Add try/catch around IUpdateHandler.HandleErrorAsync and IUpdateHandler.HandleUpdateAsync calls to catch cancellation exceptions since cancellation in IUpdateReceiver is a normal flow that shouldn't produce expcetions
Add ability to throw out pending updates on start to each implemented update receiver
Add more extensions with delegates as handlers to start polling
Future updates may include queued implementation of IUpdateReceiver.
IUpdateReceiver
interface as a push model parallel toIYieldingUpdateReceiver
pull model.TelegramBotClientPollingExtensions.ReceiveAsync
intoDefaultUpdateReceiver
ReceiveOptions
to configuregetUpdates
requestsIUpdateHandler
intoReceiveOptions
ReceiveOptions
optional parameter intoTelegramBotClientPollingExtensions
methodsAsync
suffix toIUpdateHandler
methodsITelegramBotClient
instance private in bothIYieldingUpdateReceiver
implementations. No need for it to be exposed since the inteface doesn't have it and the only place where it will be exposed is the same where actual impementations are instantiatedIUpdateHandler.HandleErrorAsync
andIUpdateHandler.HandleUpdateAsync
calls to catch cancellation exceptions since cancellation inIUpdateReceiver
is a normal flow that shouldn't produce expcetionsFuture updates may include queued implementation of
IUpdateReceiver
.