Constructor TextExtractionElement
- Namespace
- LMKit.Extraction
- Assembly
- LM-Kit.NET.dll
TextExtractionElement(string, ElementType, string)
Initializes a new instance of the TextExtractionElement class representing a simple data element.
public TextExtractionElement(string name, ElementType type, string description = "")
Parameters
name
stringThe name of the extraction element; cannot be
null
, empty, or whitespace.type
ElementTypeThe data type of the extraction element, specified by the ElementType enumeration.
description
stringAn optional description providing additional context or information about the extraction element. Defaults to an empty string if omitted.
Exceptions
- ArgumentNullException
Thrown if
name
isnull
, empty, or consists only of whitespace.
TextExtractionElement(string, IEnumerable<TextExtractionElement>, bool, string)
Initializes a new instance of the TextExtractionElement class representing a complex object or an array with nested elements.
public TextExtractionElement(string name, IEnumerable<TextExtractionElement> innerElements, bool isArray, string description = "")
Parameters
name
stringThe name of the extraction element; cannot be
null
, empty, or whitespace.innerElements
IEnumerable<TextExtractionElement>A collection of TextExtractionElement instances representing the nested elements within this extraction element. Cannot be
null
or empty.isArray
boolA boolean value indicating whether this element represents an array of objects (
true
) or a single object (false
).description
stringAn optional description providing additional context or information about the extraction element. Defaults to an empty string if omitted.
Exceptions
- ArgumentNullException
Thrown if
name
isnull
, empty, or consists only of whitespace.- ArgumentNullException
Thrown if
innerElements
isnull
or empty.