SmartObjectAdapter
Wisej.AI.Adapters.SmartObjectAdapter
Namespace: Wisej.AI.Adapters
Assembly: Wisej.AI (3.5.0.0)
Converts unstructured text into a structured .NET object.
public class SmartObjectAdapter : SmartAdapter
This class provides methods to convert text, images, streams, and clipboard content into .NET objects. It supports OCR for image processing and can handle multiple iterations to resolve missing values.
Constructors
SmartObjectAdapter()

Initializes a new instance of the SmartObjectAdapter class.
SmartObjectAdapter(container)

Initializes a new instance of the SmartObjectAdapter class with the specified container.
Properties
MaxIterations

Int32: Gets or sets the maximum number of times the adapter will try to use the available tools to complete the missing values. (Default: 2
)
If the adapter was not provided any tool, this property is ignored since it will not try to resolve missing values.
UseOCR

Boolean: Gets or sets a value indicating whether OCR should be used for image processing. (Default: False
)
Methods
Dispose(disposing)

Releases the unmanaged resources used by the SmartObjectAdapter and optionally releases the managed resources.
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
FromClipboardAsync<T>()

Converts the clipboard content to an object of type T .
T
The type of the object to return.
Returns: Task<T>. A task that represents the asynchronous operation. The task result contains the converted object.
FromClipboardAsync(objectType)

Converts the clipboard content to an object of the specified type.
Returns: Task<Object>. A task that represents the asynchronous operation. The task result contains the converted object.
FromImageAsync<T>(image)

Converts the specified image to an object of type T .
T
The type of the object to return.
Returns: Task<T>. A task that represents the asynchronous operation. The task result contains the converted object.
FromImageAsync(image, objectType)

Converts the specified image to an object of the specified type.
Returns: Task<Object>. A task that represents the asynchronous operation. The task result contains the converted object.
FromStreamAsync<T>(stream, streamType)

Converts the specified stream to an object of type T .
Returns: Task<T>. A task that represents the asynchronous operation. The task result contains the converted object.
FromStreamAsync(stream, objectType, streamType)

Converts the specified stream to an object of the specified type.
Returns: Task<Object>. A task that represents the asynchronous operation. The task result contains the converted object.
FromTextAsync<T>(text)

Converts the specified text to an object of type T .
T
The type of the object to return.
Returns: Task<T>. A task that represents the asynchronous operation. The task result contains the converted object.
FromTextAsync(text, objectType)

Converts the specified text to an object of the specified type.
Returns: Task<Object>. A task that represents the asynchronous operation. The task result contains the converted object.
OnObjectParsed(args)

Raises the ObjectParsed event.
RunAsyncCore(control)

Executes the core logic of the adapter asynchronously.
Returns: Task<Message>. A task that represents the asynchronous operation. The task result contains the response message.
Events
ObjectParsed

ObjectParsedEventHandler Occurs when an object is parsed.
Implements
Represents a provider that supplies tools.
Last updated