Fix error with broken dependencies.

This commit is contained in:
Dmitri Shimanski
2025-03-21 00:49:01 +02:00
parent f82f5cd291
commit 3094fcbabe
7 changed files with 108 additions and 104 deletions

View File

@@ -20,6 +20,20 @@ Ensure you have the required dependencies installed:
## Usage
### Provide dependencies in class
You can provide dependencies in class from constructor, and after it use it like `static`.
```csharp
public class Example : IUpdatePollingService
{
private static MyCoolService _service; // It should to be static!
public Example(MyCoolService service)
{
_service = service;
}
}
```
### Inline Query Handling
Use the `InlineAttribute` to register a method as an inline query handler.
@@ -87,4 +101,4 @@ public static async Task HandleUpdate(ITelegramBotClient bot, Update update, Can
```
## License
This project is open-source and available under the MIT License.
This project is open-source and available under the [Apache 2.0 license](LICENSE)