![]() |
Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
|
PlantUML encoder/decoder. More...
Public Member Functions | |
PlantUmlCodec () | |
PlantUML encoder/decoder. More... | |
bool | Decodes (string ContentType, out Grade Grade) |
If the decoder decodes an object with a given content type. More... | |
Task< object > | DecodeAsync (string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri) |
Decodes an object. More... | |
bool | TryGetContentType (string FileExtension, out string ContentType) |
Tries to get the content type of an item, given its file extension. More... | |
bool | TryGetFileExtension (string ContentType, out string FileExtension) |
Tries to get the file extension of an item, given its Content-Type. More... | |
bool | Encodes (object Object, out Grade Grade, params string[] AcceptedContentTypes) |
If the encoder encodes a given object. More... | |
Task< KeyValuePair< byte[], string > > | EncodeAsync (object Object, Encoding Encoding, params string[] AcceptedContentTypes) |
Encodes an object. More... | |
Static Public Attributes | |
const string | DefaultContentType = "text/vnd.plantuml" |
text/vnd.graphviz More... | |
static readonly string[] | PlantUmlContentTypes |
PlantUml content types. More... | |
static readonly string[] | PlantUmlFileExtensions |
Plain text file extensions. More... | |
Properties | |
string[] | ContentTypes [get] |
Supported content types. More... | |
string[] | FileExtensions [get] |
Supported file extensions. More... | |
PlantUML encoder/decoder.
Definition at line 12 of file PlantUmlCodec.cs.
Waher.Content.Markdown.PlantUml.PlantUmlCodec.PlantUmlCodec | ( | ) |
PlantUML encoder/decoder.
Definition at line 17 of file PlantUmlCodec.cs.
Task< object > Waher.Content.Markdown.PlantUml.PlantUmlCodec.DecodeAsync | ( | string | ContentType, |
byte[] | Data, | ||
Encoding | Encoding, | ||
KeyValuePair< string, string >[] | Fields, | ||
Uri | BaseUri | ||
) |
Decodes an object.
ContentType | Internet Content Type. |
Data | Encoded object. |
Encoding | Any encoding specified. Can be null if no encoding specified. |
Fields | Any content-type related fields and their corresponding values. |
BaseUri | Base URI, if any. If not available, value is null. |
ArgumentException | If the object cannot be decoded. |
Implements Waher.Content.IContentDecoder.
Definition at line 82 of file PlantUmlCodec.cs.
If the decoder decodes an object with a given content type.
ContentType | Content type to decode. |
Grade | How well the decoder decodes the object. |
Implements Waher.Content.IContentDecoder.
Definition at line 58 of file PlantUmlCodec.cs.
Task< KeyValuePair< byte[], string > > Waher.Content.Markdown.PlantUml.PlantUmlCodec.EncodeAsync | ( | object | Object, |
Encoding | Encoding, | ||
params string[] | AcceptedContentTypes | ||
) |
Encodes an object.
Object | Object to encode. |
Encoding | Desired encoding of text. Can be null if no desired encoding is speified. |
AcceptedContentTypes | Optional array of accepted content types. If array is empty, all content types are accepted. |
ArgumentException | If the object cannot be encoded. |
Implements Waher.Content.IContentEncoder.
Definition at line 158 of file PlantUmlCodec.cs.
bool Waher.Content.Markdown.PlantUml.PlantUmlCodec.Encodes | ( | object | Object, |
out Grade Grade | , | ||
params string[] | AcceptedContentTypes | ||
) |
If the encoder encodes a given object.
Object | Object to encode. |
Grade | How well the encoder encodes the object. |
AcceptedContentTypes | Optional array of accepted content types. If array is empty, all content types are accepted. |
Implements Waher.Content.IContentEncoder.
Definition at line 135 of file PlantUmlCodec.cs.
bool Waher.Content.Markdown.PlantUml.PlantUmlCodec.TryGetContentType | ( | string | FileExtension, |
out string | ContentType | ||
) |
Tries to get the content type of an item, given its file extension.
FileExtension | File extension. |
ContentType | Content type. |
Implements Waher.Content.IInternetContent.
Definition at line 94 of file PlantUmlCodec.cs.
bool Waher.Content.Markdown.PlantUml.PlantUmlCodec.TryGetFileExtension | ( | string | ContentType, |
out string | FileExtension | ||
) |
Tries to get the file extension of an item, given its Content-Type.
ContentType | Content type. |
FileExtension | File extension. |
Implements Waher.Content.IInternetContent.
Definition at line 114 of file PlantUmlCodec.cs.
|
static |
text/vnd.graphviz
Definition at line 24 of file PlantUmlCodec.cs.
|
static |
PlantUml content types.
Definition at line 29 of file PlantUmlCodec.cs.
|
static |
Plain text file extensions.
Definition at line 37 of file PlantUmlCodec.cs.
|
get |
Supported content types.
Implements Waher.Content.IInternetContent.
Definition at line 45 of file PlantUmlCodec.cs.
|
get |
Supported file extensions.
Implements Waher.Content.IInternetContent.
Definition at line 50 of file PlantUmlCodec.cs.