Files
archived-discord-bot/CompatBot/EventHandlers/LogParsing/SourceHandlers/ISourceHandler.cs
2020-11-13 02:48:49 +05:00

25 lines
755 B
C#

using System.Collections.Generic;
using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using CompatBot.EventHandlers.LogParsing.ArchiveHandlers;
using DSharpPlus.Entities;
namespace CompatBot.EventHandlers.LogParsing.SourceHandlers
{
public interface ISourceHandler
{
Task<(ISource? source, string? failReason)> FindHandlerAsync(DiscordMessage message, ICollection<IArchiveHandler> handlers);
}
public interface ISource
{
string SourceType { get; }
string FileName { get; }
long SourceFileSize { get; }
long SourceFilePosition { get; }
long LogFileSize { get; }
Task FillPipeAsync(PipeWriter writer, CancellationToken cancellationToken);
}
}