SmartCalendarAdapter
Namespace: Wisej.AI.Adapters
Assembly: Wisej.AI
Represents a smart calendar adapter that extends the functionality of a SmartAdapter.
- C#
- VB.NET
public class SmartCalendarAdapter : SmartAdapter
Public Class SmartCalendarAdapter
Inherits SmartAdapter
The SmartCalendarAdapter class provides methods to process text or clipboard content asynchronously.
Constructors
SmartCalendarAdapter()
Initializes a new instance of the SmartCalendarAdapter class.
This constructor initializes the SmartPrompt with a default prompt message.
Methods
FromClipboardAsync()
Processes the content from the clipboard asynchronously.
Returns: Task. A task that represents the asynchronous operation.
This method reads text or image data from the clipboard and processes it asynchronously.
var adapter = new SmartCalendarAdapter();
await adapter.FromClipboardAsync();
Throws:
- InvalidOperationException Thrown when the adapter is busy.
FromTextAsync(text)
Processes the specified text asynchronously.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to be processed. |
Returns: Task. A task that represents the asynchronous operation.
This method sets the internal text and initiates the asynchronous processing.
var adapter = new SmartCalendarAdapter();
await adapter.FromTextAsync("Sample text");
Throws:
- ArgumentNullException Thrown when the text is null.
- InvalidOperationException Thrown when the adapter is busy.
RunAsyncCore(control)
Executes the core logic of the adapter asynchronously.
| Parameter | Type | Description |
|---|---|---|
| control | Control | The control associated with the operation. |
Returns: Task<Message>. A task that represents the asynchronous operation, containing the message response.
This method uses a session to ask a question based on the provided text and tracks the usage.
Inherited By
| Name | Description |
|---|---|
| SmartFullCalendarAdapter |
Implements
| Name | Description |
|---|---|
| IToolProvider | Represents a provider that supplies tools. |