using System; using System.IO; using System.Net.Http; using System.Threading; using System.Threading.Tasks; namespace Elsa.Http.Contracts; /// /// A strategy that reads a of a given content type. /// public interface IHttpContentParser { /// /// The priority of the parser as compared to other parsers. /// The higher the number, the higher priority. /// int Priority { get; } /// /// Returns a value indicating whether this reader supports the specified content type. /// bool GetSupportsContentType(string contentType); /// /// Reads the specified stream and returns a parsed object of the specified type. If no type is specified, a string is returned. /// Task ReadAsync(Stream content, Type? returnType, CancellationToken cancellationToken); }