Files
BotPages/BotPages.Core/Context/PageContextAdapterExtensions.cs
FrigaT 0089926fb0
All checks were successful
CI / build-test (push) Successful in 52s
Release / pack-and-publish (release) Successful in 42s
Чистка кода
2025-12-24 17:09:15 +03:00

16 lines
639 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using BotPages.Core.Abstractions;
namespace BotPages.Core;
/// <summary>
/// Расширения <see cref="PageContext"/> для работы с адаптером.
/// Упрощают создание универсального `SendRequest`.
/// </summary>
public static class PageContextAdapterExtensions
{
/// <summary>
/// Отправить универсальный запрос через привязанный адаптер.
/// </summary>
public static Task<string?> SendAsync(this PageContext ctx, SendRequest request, CancellationToken ct = default)
=> ctx.Adapter.SendAsync(request, ct);
}