3using System.Threading.Tasks;
37 ImageCodec.ContentTypeSvg
54 string GraphDescription;
56 using (StreamReader rd =
new StreamReader(State.
From))
58 GraphDescription = rd.ReadToEnd();
66 s = s.Substring(0, i);
78 s = s.Substring(0, i);
91 Language = Path.GetExtension(State.
FromFileName).ToLower();
92 if (Language.StartsWith(
"."))
93 Language = Language.Substring(1);
130 byte[] Data = await Runtime.IO.Files.ReadAllBytesAsync(Graph.FileName);
132 await State.
To.WriteAsync(Data, 0, Data.Length);
Contains the state of a content conversion process.
string ToContentType
Content type of the content to convert to. This value might be changed, in case the converter finds a...
string[] PossibleContentTypes
Possible content types the converter is allowed to convert to. Can be null if there are no alternativ...
string FromContentType
Content type of the content to convert from.
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.
const string ContentTypePng
image/png
const string ContentTypeSvg
image/svg+xml
Converts GraphViz documents to images.
string[] FromContentTypes
Converts content from these content types.
virtual string[] ToContentTypes
Converts content to these content types.
async Task< bool > ConvertAsync(ConversionState State)
Performs the actual conversion.
virtual Grade ConversionGrade
How well the content is converted.
GraphVizDocumentToImageConverter()
Converts GraphViz documents to images.
Class managing GraphViz integration into Markdown documents.
Basic interface for Internet Content encoders. A class implementing this interface and having a defau...
ResultType
Image types supported by GraphViz