From 706b0f522a981aebb4486c956ae1c8e956c80f2e Mon Sep 17 00:00:00 2001 From: Xilosof Date: Sun, 14 Mar 2021 21:55:07 +0300 Subject: [PATCH] Add static propert MaxNumberOfRetries. This is necessary so that the DeviceSession instance can get this setting. There is no direct access to the settings in BotBase at the moment. This property will be set when calling the Start method for the bot and is the same for all bots in the same application. --- TelegramBotBase/Sessions/DeviceSession.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TelegramBotBase/Sessions/DeviceSession.cs b/TelegramBotBase/Sessions/DeviceSession.cs index 7ce946f..e925cac 100644 --- a/TelegramBotBase/Sessions/DeviceSession.cs +++ b/TelegramBotBase/Sessions/DeviceSession.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; @@ -876,5 +876,15 @@ namespace TelegramBotBase.Sessions } #endregion + + #region "Static" + + /// + /// Indicates the maximum number of times a request that received error + /// 429 will be sent again after a timeout until it receives code 200 or an error code not equal to 429. + /// + public static uint MaxNumberOfRetries { get; set; } + + #endregion "Static" } }