2using System.Threading.Tasks;
32 public string[]
ToContentTypes =>
new string[] { JavaScriptCodec.DefaultContentType };
48 using (StreamReader rd =
new StreamReader(State.
From))
50 Jsx = await rd.ReadToEndAsync();
58 await State.
To.WriteAsync(Data, 0, Data.Length);
59 State.ToContentType +=
"; charset=utf-8";
85 return Convert(Jsx,
null, Session, FileName,
true);
100 return CssxToCss.
Convert(Jsx,
"{{",
"}}", State, Session, FileName, LockSession);
Contains the state of a content conversion process.
Variables Session
Session states.
bool HasError
If an error should be returned.
Stream To
Stream pointing to where binary representation of content is to be sent.
string FromFileName
If the content is coming from a file, this parameter contains the name of that file....
Stream From
Stream pointing to binary representation of content.
Converts CSSX-files to CSS, by evaluating emebedded script and replacing it with results.
static Task< string > Convert(string Cssx, ConversionState State, string FileName)
Converts CSSX to CSS, using the current theme
Converts JavascriptX-files to HTML, by evaluating emebedded script and replacing it with results.
string[] FromContentTypes
Converts content from these content types.
Grade ConversionGrade
How well the content is converted.
JsxToJs()
Converts JavascriptX-files to HTML, by evaluating emebedded script and replacing it with results.
static Task< string > Convert(string Jsx, Variables Session, string FileName)
Converts JavascriptX to HTML, using the current theme
string[] ToContentTypes
Converts content to these content types.
static Task< string > Convert(string Jsx, ConversionState State, string FileName)
Converts JavascriptX to HTML, using the current theme
async Task< bool > ConvertAsync(ConversionState State)
Performs the actual conversion.
Static class managing binary representations of strings.
static Encoding Utf8WithBom
UTF-8 encoding with Byte Order Mark (BOM)
Basic interface for Internet Content encoders. A class implementing this interface and having a defau...