> For the complete documentation index, see [llms.txt](https://docs.wisej.com/ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/ai/components/api/smartadapter/wisej.ai.adapters.smartcalendaradapter.md).

# SmartCalendarAdapter

Namespace: **Wisej.AI.Adapters**

Assembly: **Wisej.AI** (3.5.0.0)

* [SmartAdapter](/ai/components/api/smartadapter.md)
  * [SmartCalendarAdapter](/ai/components/api/smartadapter/wisej.ai.adapters.smartcalendaradapter.md)

Represents a smart calendar adapter that extends the functionality of a SmartAdapter.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SmartCalendarAdapter : SmartAdapter
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SmartCalendarAdapter
    Inherits SmartAdapter
```

{% endtab %}
{% endtabs %}

The SmartCalendarAdapter class provides methods to process text or clipboard content asynchronously.

## Constructors

### ![](/files/ptrKjmmRoQB76pvrIqh0) SmartCalendarAdapter()

Initializes a new instance of the [SmartCalendarAdapter](/ai/components/api/smartadapter/wisej.ai.adapters.smartcalendaradapter.md) class.

This constructor initializes the SmartPrompt with a default prompt message.

## Methods

### ![](/files/ptrKjmmRoQB76pvrIqh0) FromClipboardAsync()

Processes the content from the clipboard asynchronously.

**Returns:** [Task](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task). A task that represents the asynchronous operation.

This method reads text or image data from the clipboard and processes it asynchronously.

```csharp

var adapter = new SmartCalendarAdapter();
await adapter.FromClipboardAsync();

```

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  Thrown when the adapter is busy.

### ![](/files/ptrKjmmRoQB76pvrIqh0) FromTextAsync(text)

Processes the specified text asynchronously.

| Parameter | Type                                                          | Description               |
| --------- | ------------------------------------------------------------- | ------------------------- |
| **text**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | The text to be processed. |

**Returns:** [Task](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task). A task that represents the asynchronous operation.

This method sets the internal text and initiates the asynchronous processing.

```csharp

var adapter = new SmartCalendarAdapter();
await adapter.FromTextAsync("Sample text");

```

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  Thrown when the text is null.
* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception)\
  Thrown when the adapter is busy.

### ![](/files/KL0Ik37djZRr8a07Wopd) RunAsyncCore(control)

Executes the core logic of the adapter asynchronously.

| Parameter   | Type                                                      | Description                                |
| ----------- | --------------------------------------------------------- | ------------------------------------------ |
| **control** | [Control](https://docs.wisej.com/api?q=wisej.web.control) | The control associated with the operation. |

**Returns:** [Task\<Message>](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1). 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](/ai/components/api/smartadapter/wisej.ai.adapters.smartfullcalendaradapter.md) |             |

## Implements

| Name                                                                              | Description                                |
| --------------------------------------------------------------------------------- | ------------------------------------------ |
| [IToolProvider](/ai/components/api/smarttool/wisej.ai.smarttool.itoolprovider.md) | Represents a provider that supplies tools. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/ai/components/api/smartadapter/wisej.ai.adapters.smartcalendaradapter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
