3using System.Threading.Tasks;
77 public Task<ContentResponse>
DecodeAsync(
string ContentType,
byte[] Data,
System.Text.Encoding Encoding,
78 KeyValuePair<string, string>[] Fields, Uri BaseUri,
ICodecProgress Progress)
91 switch (FileExtension.ToLower())
98 ContentType =
string.Empty;
111 switch (ContentType.ToLower())
114 FileExtension =
"htmlx";
118 FileExtension =
string.Empty;
Contains information about a response to a content request.
bool Decodes(string ContentType, out Grade Grade)
If the decoder decodes an object with a given content type.
bool TryGetFileExtension(string ContentType, out string FileExtension)
Tries to get the file extension of an item, given its Content-Type.
static readonly string[] HtmlxContentTypes
Plain text content types.
string[] FileExtensions
Supported file extensions.
const string DefaultContentType
Default Content-Type for HTMLX: text/x-htmlx
static readonly string[] HtmlxFileExtensions
Plain text file extensions.
Task< ContentResponse > DecodeAsync(string ContentType, byte[] Data, System.Text.Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri, ICodecProgress Progress)
Decodes an object.
string[] ContentTypes
Supported content types.
bool TryGetContentType(string FileExtension, out string ContentType)
Tries to get the content type of an item, given its file extension.
HtmlxDecoder()
HTMLX encoder/decoder.
Static class managing binary representations of strings.
static string GetString(byte[] Data, int Offset, int Count, Encoding DefaultEncoding)
Gets a string from its binary representation, taking any Byte Order Mark (BOM) into account.
Interface for reporting progress about an encoding or decoding.
Basic interface for Internet Content decoders. A class implementing this interface and having a defau...