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 =
"cssx";
118 FileExtension =
string.Empty;
Contains information about a response to a content request.
static readonly string[] CssxContentTypes
Plain text content types.
CssxDecoder()
CSSX encoder/decoder.
string[] ContentTypes
Supported content types.
static readonly string[] CssxFileExtensions
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.
const string DefaultContentType
Default Content-Type for CSSX: text/x-cssx
bool TryGetFileExtension(string ContentType, out string FileExtension)
Tries to get the file extension of an item, given its Content-Type.
bool Decodes(string ContentType, out Grade Grade)
If the decoder decodes an object with a given content type.
string[] FileExtensions
Supported file extensions.
bool TryGetContentType(string FileExtension, out string ContentType)
Tries to get the content type of an item, given its file extension.
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...