Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IToonEncoder.cs
1using System;
5
7{
11 public enum BracketsMode
12 {
16 Embed,
17
21 Ignore,
22
26 Count
27 }
28
32 public interface IToonEncoder : IProcessingSupport<Type>
33 {
40 void Encode(object Object, int? Indent, ToonOutput Toon);
41
45 bool EncodesMultipleRows { get; }
46
50 bool EncodesAsVector(object Value);
51
55 bool EncodesAsObject(object Value);
56
65 bool CanFold(object Object, out string FoldedName, out object FoldedValue);
66
74 void Encode(object Object, int? Indent, ToonOutput Toon, BracketsMode Brackets);
75
81 IEnumerator GetElements(object Object);
82
88 IEnumerator<KeyValuePair<string, object>> GetParameters(object Object);
89 }
90}
TOON Output builder
Definition: ToonOutput.cs:13
Interface for encoding objects of certain types to TOON.
Definition: IToonEncoder.cs:33
bool EncodesMultipleRows
If the encoder encodes values into multiple rows.
Definition: IToonEncoder.cs:45
IEnumerator GetElements(object Object)
Gets an enumerator for the child-elements of an object.
void Encode(object Object, int? Indent, ToonOutput Toon)
Encodes the Object to TOON.
bool EncodesAsVector(object Value)
If the encoder encodes a value as a vector.
bool EncodesAsObject(object Value)
If the encoder encodes a value as an object.
bool CanFold(object Object, out string FoldedName, out object FoldedValue)
Checks if an object can be folded to a shorter representation, and if so, returns the folded name and...
IEnumerator< KeyValuePair< string, object > > GetParameters(object Object)
Gets available parameters to encode from an object.
void Encode(object Object, int? Indent, ToonOutput Toon, BracketsMode Brackets)
Encodes the Object to TOON.
Interface for detecting interfaces supporting objects with predefined features.
BracketsMode
How brackets should be handled when encoding vectors.
Definition: IToonEncoder.cs:12