26 lines
681 B
C#
26 lines
681 B
C#
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace xAiApi.Interfaces.Extractors
|
|
{
|
|
/// <summary>
|
|
/// a Service for Extracting File Content ...
|
|
/// </summary>
|
|
public interface IXFileContentExtractor
|
|
{
|
|
/// <summary>
|
|
/// Check if this extractor supports the specified MIME type ...
|
|
/// </summary>
|
|
bool CanExtract(string mimeType);
|
|
|
|
/// <summary>
|
|
/// Extract text content from file stream ...
|
|
/// </summary>
|
|
Task<string> ExtractAsync(
|
|
Stream fileStream,
|
|
string mimeType,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
}
|
|
} |