Commit 5ab4360
committed
Refactor BotApp to manage its own CancellationTokenSource
The constructor of the `BotApp` class in the `TelegramBot` namespace has been modified to remove the `cancellationTokenSource` parameter. Instead, a new `CancellationTokenSource` instance is created within the constructor.
In the `BotBuilder` class within the `TelegramBot.Builders` namespace, the instantiation of `CancellationTokenSource` has been removed, and the `BotApp` constructor is called without passing a `cancellationTokenSource` parameter.
These changes simplify the instantiation process of `BotApp` by encapsulating the creation of `CancellationTokenSource` within the class itself.1 parent 01f8c93 commit 5ab4360
2 files changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | 143 | | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
0 commit comments