# IDataObject

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.0.0.0)

Provides a format-independent mechanism for transferring data.

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

```csharp
public interface IDataObject
```

{% endtab %}

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

```visual-basic
Public Interface IDataObject
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/uCY6T77rh488FWHzpJ6P)GetData(format, autoConvert)

Retrieves the data associated with the specified data format, using autoConvert to determine whether to convert the data to the format.

| Parameter       | Type                                                                  | Description |
| --------------- | --------------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) |             |

**Returns:** [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetData(format)

Retrieves the data associated with the specified data format.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetData(format)

Retrieves the data associated with the specified class type format.

| Parameter  | Type                                                            | Description |
| ---------- | --------------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/en-us/dotnet/api/system.type) |             |

**Returns:** [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetDataPresent(format, autoConvert)

Determines whether data stored in this instance is associated with the specified format, using autoConvert to determine whether to convert the data to the format.

| Parameter       | Type                                                                  | Description |
| --------------- | --------------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetDataPresent(format)

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetDataPresent(format)

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.

| Parameter  | Type                                                            | Description |
| ---------- | --------------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/en-us/dotnet/api/system.type) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetFormats(autoConvert)

Gets a list of all formats that data stored in this instance is associated with or can be converted to, using autoConvert to determine whether to retrieve all formats that the data can be converted to or' only native data formats.

| Parameter       | Type                                                                  | Description |
| --------------- | --------------------------------------------------------------------- | ----------- |
| **autoConvert** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) |             |

**Returns:** [String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string).

### ![](/files/uCY6T77rh488FWHzpJ6P)GetFormats()

Gets a list of all formats that data stored in this instance is associated with or can be converted to.

**Returns:** [String\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.string).

### ![](/files/uCY6T77rh488FWHzpJ6P)SetData(format, autoConvert, data)

Stores the specified data and its associated format in this instance, using autoConvert to specify whether the data can be converted to another format.

| Parameter       | Type                                                                  | Description |
| --------------- | --------------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) |             |
| **data**        | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)   |             |

### ![](/files/uCY6T77rh488FWHzpJ6P)SetData(format, data)

Stores the specified data and its associated format in this instance.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) |             |
| **data**   | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

### ![](/files/uCY6T77rh488FWHzpJ6P)SetData(format, data)

Stores the specified data and its associated class type in this instance.

| Parameter  | Type                                                                | Description |
| ---------- | ------------------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/en-us/dotnet/api/system.type)     |             |
| **data**   | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

### ![](/files/uCY6T77rh488FWHzpJ6P)SetData(data)

Stores the specified data in this instance, using the class of the data for the format.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **data**  | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

## Implemented By

| Name                                                              | Description                                 |
| ----------------------------------------------------------------- | ------------------------------------------- |
| [DataObject](/api/v3.0/wisej.web/general/wisej.web.dataobject.md) | Implements a basic data transfer mechanism. |


---

# Agent Instructions: 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:

```
GET https://docs.wisej.com/api/v3.0/wisej.web/interfaces/wisej.web.idataobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
