Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractsExtensions.cs
1using System.Text;
2using System.Threading.Tasks;
3using System.Xml;
5
7{
12 public static class ContractsExtensions
13 {
19 public static Task<string> GenerateSmartContractXml(this MarkdownDocument Document)
20 {
21 return Document.GenerateSmartContractXml(XML.WriterSettings(false, true));
22 }
23
31 public static async Task<string> GenerateSmartContractXml(this MarkdownDocument Document, XmlWriterSettings XmlSettings)
32 {
33 StringBuilder Output = new StringBuilder();
34 await Document.GenerateSmartContractXml(Output, XmlSettings);
35 return Output.ToString();
36 }
37
44 public static Task GenerateSmartContractXml(this MarkdownDocument Document, StringBuilder Output)
45 {
46 return Document.GenerateSmartContractXml(Output, XML.WriterSettings(false, true));
47 }
48
56 public static async Task GenerateSmartContractXml(this MarkdownDocument Document, StringBuilder Output, XmlWriterSettings XmlSettings)
57 {
58 XmlSettings.ConformanceLevel = ConformanceLevel.Fragment;
59
60 using (ContractsRenderer Renderer = new ContractsRenderer(Output, XmlSettings, null))
61 {
62 await Document.RenderDocument(Renderer);
63 }
64 }
65 }
66}
Markdown rendering extensions for Smart Contracts. Ref: https://neuro-foundation.io/SmartContracts....
static async Task GenerateSmartContractXml(this MarkdownDocument Document, StringBuilder Output, XmlWriterSettings XmlSettings)
Generates Human-Readable XML for Smart Contracts from the markdown text. Ref: https://neuro-foundatio...
static Task< string > GenerateSmartContractXml(this MarkdownDocument Document)
Generates Human-Readable XML for Smart Contracts from the markdown text. Ref: https://neuro-foundatio...
static async Task< string > GenerateSmartContractXml(this MarkdownDocument Document, XmlWriterSettings XmlSettings)
Generates Human-Readable XML for Smart Contracts from the markdown text. Ref: https://neuro-foundatio...
static Task GenerateSmartContractXml(this MarkdownDocument Document, StringBuilder Output)
Generates Human-Readable XML for Smart Contracts from the markdown text. Ref: https://neuro-foundatio...
Renders Contracts XML from a Markdown document.
Contains a markdown document. This markdown document class supports original markdown,...
async Task RenderDocument(IRenderer Output)
Renders the document using provided output format.
Helps with common XML-related tasks.
Definition: XML.cs:19
static XmlWriterSettings WriterSettings(bool Indent, bool OmitXmlDeclaration)
Gets an XML writer settings object.
Definition: XML.cs:1177