# AsyncResultResolver class
{: .no_toc }

Takes an add-in's answer to a request of the IDE's, which the IDE waits for. The event that makes the request passes one, and the add-in calls its [**Resolve**](#resolve) once, before the handler returns or later.

| Where it comes from | What it answers |
|---|---|
| [**HtmlEventProperties.AsyncResultResolver**](/tB/Packages/tbIDE/HtmlEventProperties.md#asyncresultresolver) | a request of a [datasheet](/tB/Packages/tbIDE/Datasheet.md) |
| [**SourceHoverProvider.Hover**](/tB/Packages/tbIDE/SourceHoverProvider.md#hover) | the text to add to a hover |
| [**SourceCodeLensProvider.GetResults**](/tB/Packages/tbIDE/SourceCodeLensProvider.md#getresults) | the lenses of a file |
| [**AIConversation.ToolCall**](/tB/Packages/tbIDE/AIConversation.md#toolcall) | the result of one of the add-in's tools |

The handler may keep the resolver and call it from a timer or another thread. The datasheet of Sample 27 is answered that way, from worker threads that read a database.

* TOC
{:toc}

## Methods

### Resolve
{: .no_toc }

Gives the answer.

Syntax: *resolver*.**Resolve** *retval* [, *MimeType* ]

*retval*
: *required* The answer. **Variant**; each request takes a **String**, whose form its page gives.

*MimeType*
: *optional* The type of *retval*, for a tool's result that is not text: `"image/png"`, `"image/jpeg"`, `"image/webp"` or `"image/gif"`, with *retval* the image as base64. **String**. Only [**AIConversation.ToolCall**](/tB/Packages/tbIDE/AIConversation.md#toolcall) takes it; see there.

### SetPriority
{: .no_toc }

Places a hover provider's answer among the others in the hover. Call it before [**Resolve**](#resolve). Answers show in the order of their priority, the lowest first, after the IDE's own text; an answer whose provider calls no **SetPriority** has priority 0. Only a hover uses it.

Syntax: *resolver*.**SetPriority** *Priority*

*Priority*
: *required* The priority. **Long**.

## See Also

- [HtmlEventProperties.AsyncResultResolver](/tB/Packages/tbIDE/HtmlEventProperties.md#asyncresultresolver) property
- [SourceHoverProvider](/tB/Packages/tbIDE/SourceHoverProvider.md) class
- [SourceCodeLensProvider](/tB/Packages/tbIDE/SourceCodeLensProvider.md) class
- [AIConversation](/tB/Packages/tbIDE/AIConversation.md) class
