EasyBotEngine 8.2.3
See the version list below for details.
dotnet add package EasyBotEngine --version 8.2.3
NuGet\Install-Package EasyBotEngine -Version 8.2.3
<PackageReference Include="EasyBotEngine" Version="8.2.3" />
<PackageVersion Include="EasyBotEngine" Version="8.2.3" />
<PackageReference Include="EasyBotEngine" />
paket add EasyBotEngine --version 8.2.3
#r "nuget: EasyBotEngine, 8.2.3"
#:package EasyBotEngine@8.2.3
#addin nuget:?package=EasyBotEngine&version=8.2.3
#tool nuget:?package=EasyBotEngine&version=8.2.3
EasyBotEngine
#EN
A lightweight engine for sequential data processing via nodes and middleware. The basic idea: a set of Endpoint nodes (entry points), regular Node nodes (processing steps), and middleware that execute before the primary node and can modify the buffer, redirect to another node, or terminate the process.
Features
- Simple node and middleware model.
- DI integration via Microsoft.Extensions.DependencyInjection.
- Cancellation support (CancellationToken).
- Execution summary logging (ILogger).
- Explicit exceptions: EndpointNodeNotFoundException, NodeNotFoundException.
Key types
- EasyBotEngine<TInput, TBuffer, TOutput> — the engine's main class.
- IEngineInput<TBuffer> — the input entity (EndpointNodeId property: string and Object: TBuffer).
- Node<TBuffer, TOutput> — the base node; methods Next<TNextNode>(TBuffer) for moving to the next node and Finish (TOutput).
- EndpointNode<TBuffer, TOutput> — the endpoint node (a descendant of Node), has an identifier.
- Middleware<TBuffer, TOutput> — the middleware; methods GetCondition(TestBuffer, CancellationToken?) for use only in certain scenarios, and Invoke(TBuffer, CancellationToken?), as well as Complete(TBuffer) for moving to the next node and Finish(TOutput) for terminating the middleware process.
- INodeResult<TBuffer, TOutput> — the result of invoking a node/middleware (Object, Output, NextNode).
Service Registration (DI)
- Use extensions:
- services.AddEngineNode<TNode, TBuffer, TOutput>()
- services.AddEngineEndpointNode<TNode, TBuffer, TOutput>()
- services.AddEngineMiddleware<TMiddleware, TBuffer, TOutput>()
- Recommended lifetime: Transient.
Error and Cancellation Handling
- If the starting endpoint is not found, an EndpointNodeNotFoundException is thrown.
- If an unknown next node is encountered in the chain, a NodeNotFoundException is thrown.
- Cancellation is passed through a CancellationToken; TaskCanceledException/OperationCanceledException is thrown upon cancellation.
Logging
- The engine accepts ILogger<EasyBotEngine<TInput, TBuffer, TOutput>> via DI.
- At the end of Process(TInput, CancellationToken?), the engine logs an execution summary (list of middleware and nodes, duration, status).
Testing
- For unit tests, it's convenient to register test nodes/middleware via AddEngineNode<TNode,TBuffer,TOutput>(this IServiceCollection, ServiceLifetime) / AddEngineEndpointNode<TNode,TBuffer,TOutput>(this IServiceCollection, ServiceLifetime) and use ServiceCollection + BuildServiceProvider().
Additional
- Check out ServiceCollectionExtensions for convenient registration methods.
Contributing
- Bug fixes and minor improvements are welcome. Open a PR with your tests.
#RU
Лёгкий движок для последовательной обработки данных через ноды и middleware. Основная идея: набор Endpoint-нод — точки входа, обычные Node-ноды — шаги обработки и Middleware, которые выполняются перед первичной нодой и могут изменить буфер, перенаправить на другую ноду или завершить процесс.
Особенности
- Простая модель нод и middleware.
- DI-интеграция через Microsoft.Extensions.DependencyInjection.
- Поддержка отмены (CancellationToken).
- Логирование сводки выполнения (ILogger).
- Явные исключения: EndpointNodeNotFoundException, NodeNotFoundException.
Ключевые типы
- EasyBotEngine<TInput, TBuffer, TOutput> — основной класс движка.
- IEngineInput<TBuffer> — входная сущность (свойство EndpointNodeId : string и Object : TBuffer).
- Node<TBuffer, TOutput> — базовая нода; методы Next<TNextNode>(TBuffer) для перехода в следущую ноду и Finish (TOutput) .
- EndpointNode<TBuffer, TOutput> — нода-эндпоинт (наследник Node), имеет идентификатор.
- Middleware<TBuffer, TOutput> — middleware; методы GetCondition(TestBuffer, CancellationToken?) для применения только для определенных сценариев, и Invoke(TBuffer, CancellationToken?), а также Complete(TBuffer) для перехода к следующей ноде и Finish(TOutput) для завершения процесса из middleware.
- INodeResult<TBuffer, TOutput> — результат вызова ноды/middleware (Object, Output, NextNode).
Регистрация сервисов (DI)
- Используйте расширения:
- services.AddEngineNode<TNode, TBuffer, TOutput>()
- services.AddEngineEndpointNode<TNode, TBuffer, TOutput>()
- services.AddEngineMiddleware<TMiddleware, TBuffer, TOutput>()
- Рекомендуемая lifetime: Transient.
Обработка ошибок и отмены
- Если стартовый эндпоинт не найден — EndpointNodeNotFoundException.
- Если в цепочке встречается неизвестная следующая нода — NodeNotFoundException.
- Отмена прокидывается через CancellationToken; при отмене выбрасывается TaskCanceledException/OperationCanceledException.
Логирование
- Движок принимает ILogger<EasyBotEngine<TInput, TBuffer, TOutput>> через DI.
- В конце Process(TInput, CancellationToken?) движок логирует сводку выполнения (список middleware и нод, длительность, статус).
Тестирование
- Для юнит-тестов удобно регистрировать тестовые ноды/мидлвары через AddEngineNode<TNode,TBuffer,TOutput>(this IServiceCollection, ServiceLifetime) / AddEngineEndpointNode<TNode,TBuffer,TOutput>(this IServiceCollection, ServiceLifetime) и использовать ServiceCollection + BuildServiceProvider().
Дополнительно
- Посмотрите ServiceCollectionExtensions — удобные методы регистрации.
Контрибьютинг
- Фикс багов и небольшие улучшения приветствуются. Открывайте PR с тестами.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.4.0 | 153 | 3/25/2026 |
| 8.3.0 | 107 | 2/20/2026 |
| 8.2.3 | 99 | 2/19/2026 |
| 8.2.2 | 105 | 2/19/2026 |
| 8.2.1 | 101 | 2/19/2026 |
| 8.2.0 | 106 | 2/19/2026 |
| 8.1.0 | 105 | 2/19/2026 |
| 1.4.2 | 104 | 2/19/2026 |
| 1.4.1 | 99 | 2/19/2026 |
| 1.4.0 | 101 | 2/18/2026 |
| 1.3.2 | 111 | 2/17/2026 |
| 1.3.1 | 104 | 2/17/2026 |
| 1.3.0 | 107 | 2/17/2026 |
| 1.2.0 | 210 | 9/3/2025 |
| 1.1.0 | 200 | 9/2/2025 |
| 1.0.0 | 194 | 9/2/2025 |