3using System.Threading.Tasks;
38 ImageCodec.ContentTypeSvg
55 string GraphDescription;
57 using (StreamReader rd =
new StreamReader(State.
From))
59 GraphDescription = rd.ReadToEnd();
67 s = s.Substring(0, i);
79 s = s.Substring(0, i);
90 Graph = await
PlantUml.GetGraphInfo(
"uml", GraphDescription, ResultType.Svg,
true);
95 Graph = await
PlantUml.GetGraphInfo(
"uml", GraphDescription, ResultType.Png,
true);
103 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.
Stream From
Stream pointing to binary representation of content.
const string ContentTypePng
image/png
const string ContentTypeSvg
image/svg+xml
Converts PlantUML documents to images.
virtual string[] ToContentTypes
Converts content to these content types.
virtual Grade ConversionGrade
How well the content is converted.
string[] FromContentTypes
Converts content from these content types.
PlantUmlDocumentToImageConverter()
Converts PlantUML documents to images.
async Task< bool > ConvertAsync(ConversionState State)
Performs the actual conversion.
Class managing PlantUML integration into Markdown documents.
Static class managing loading of resources stored as embedded resources or in content files.
static async Task< byte[]> ReadAllBytesAsync(string FileName)
Reads a binary file asynchronously.
Basic interface for Internet Content encoders. A class implementing this interface and having a defau...