Documentation
Table of Contents

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

definition IntentDefinition

The definition.

Returns

string

The JSON text of one definition object.

Exceptions

ArgumentNullException

definition is 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

definitions IEnumerable<IntentDefinition>

The definitions.

Returns

string

The JSON text of a list of definition objects.

Exceptions

ArgumentNullException

definitions is null or holds null.