Method Write
- Namespace
- IntentSharp.Catalog
- Assembly
- IntentSharp.Catalog.dll
Write(IntentDefinition)
Writes definition as JSON intent file text, indented. Every property is written, unset ones
left out; Source and SourceSequence are not file
properties and are not written. A valid definition reads back with Read(string, string) to one equal to it in every
file property. The
definition is not checked here: Read(string, string) reports what is wrong with it.
public static string Write(IntentDefinition definition)
Parameters
definitionIntentDefinitionThe definition.
Returns
- string
The JSON text of one definition object.
Exceptions
- ArgumentNullException
definitionis null.
Write(IEnumerable<IntentDefinition>)
Writes definitions as one JSON intent file, indented: a list of definition objects, in order.
Each is written as Write(IntentDefinition) writes it.
public static string Write(IEnumerable<IntentDefinition> definitions)
Parameters
definitionsIEnumerable<IntentDefinition>The definitions.
Returns
- string
The JSON text of a list of definition objects.
Exceptions
- ArgumentNullException
definitionsis null or holds null.