Files
BotPages/BotPages.Core/Context/PageContextAdapterExtensions.cs
2025-12-24 16:30:43 +03:00

17 lines
670 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;
using BotPages.Core.Messaging;
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);
}