Переработанная версия ядра
All checks were successful
CI / build-test (push) Successful in 42s

This commit is contained in:
2025-12-05 12:57:05 +03:00
parent ee175a35a0
commit d817417a69
81 changed files with 2335 additions and 1453 deletions

View File

@@ -0,0 +1,22 @@
namespace BotPages.Core.Abstractions;
/// <summary>
/// Описание файла, полученного или отправляемого через мессенджер.
/// </summary>
public sealed class FileDescriptor
{
/// <summary>Идентификатор файла в мессенджере.</summary>
public required string Id { get; init; }
/// <summary>Имя файла.</summary>
public required string Name { get; init; }
/// <summary>Расширение файла.</summary>
public required string Extension { get; init; }
/// <summary>Размер файла в байтах.</summary>
public long Size { get; init; }
/// <summary>MIME-тип файла.</summary>
public string? Mime { get; init; }
/// <summary>Тип файла.</summary>
public FileKind Kind { get; init; } = FileKind.Document;
/// <summary>Функция получения потока файла.</summary>
public Func<CancellationToken, Task<Stream>> GetStreamAsync { get; init; } = _ => Task.FromResult<Stream>(Stream.Null);
}