# AspireExportAttribute Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [AspireExportAttribute](/reference/api/csharp/aspire.hosting/aspireexportattribute.md)
- Kind: `Properties`
- Members: `7`

Marks a method, type, or assembly-level type as an ATS (Aspire Type System) export.

## Description

- Name: `Description`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets a description of what this export does.

```csharp
public string? Description { get; set; }
```

## ExposeMethods

- Name: `ExposeMethods`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether to expose public instance methods of this type as ATS capabilities.

```csharp
public bool ExposeMethods { get; set; }
```

## Remarks

When true, the type's public instance methods are automatically exposed as capabilities (unless marked with [AspireExportIgnoreAttribute](/reference/api/csharp/aspire.hosting/aspireexportignoreattribute.md)).

Method capabilities are named as `{Package}/{TypeName}.{methodName}` (camelCase method name). The first parameter of the capability will be a handle to the instance.

## ExposeProperties

- Name: `ExposeProperties`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether to expose properties of this type as ATS capabilities.

```csharp
public bool ExposeProperties { get; set; }
```

## Remarks

When true, the type's public instance properties that return ATS-compatible types are automatically exposed as get/set capabilities (unless marked with [AspireExportIgnoreAttribute](/reference/api/csharp/aspire.hosting/aspireexportignoreattribute.md)).

Use this for context types passed to callbacks (like `EnvironmentCallbackContext`) that provide access to runtime state.

Property capabilities are named as:

- `{Package}/{TypeName}.{propertyName}` for getters (camelCase property name)
- `{Package}/{TypeName}.set{PropertyName}` for setters (writable properties only)

## Id

- Name: `Id`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs#L147)

Gets the method name for capability exports.

```csharp
public string? Id { get; }
```

## Remarks

The full capability ID is computed as `{AssemblyName}/{Id}`.

This is null for type exports.

## MethodName

- Name: `MethodName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets the method name to use in generated polyglot SDKs.

```csharp
public string? MethodName { get; set; }
```

## Remarks

When not specified, the method name from [AspireExportAttribute.Id](/reference/api/csharp/aspire.hosting/aspireexportattribute/properties.md#id) is used directly.

Use this property to override the generated name when disambiguation is needed (e.g., to avoid collisions with another integration's method of the same name). Each language generator will apply its own formatting convention (camelCase for TypeScript, snake_case for Python, etc.).

## RunSyncOnBackgroundThread

- Name: `RunSyncOnBackgroundThread`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether synchronous exported methods should be invoked on a background thread by the ATS dispatcher.

```csharp
public bool RunSyncOnBackgroundThread { get; set; }
```

## Remarks

Set this to `true` for synchronous exports that may invoke synchronous callback delegates which in turn re-enter the remote host through ATS. Running the export on a background thread allows the JSON-RPC request loop to continue processing nested callback and capability invocations while the synchronous method waits for the callback to complete.

This setting only affects synchronous exported methods. Async exports that already return `Tasks.Task` or `Tasks.Task`1` are awaited normally and do not use this option.

When applied to a type, this setting also applies to exported members discovered from that type unless an individual member overrides it.

## Type

- Name: `Type`
- Modifiers: `nullable` `get; set`
- Returns: `Type?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets the CLR type for assembly-level type exports.

```csharp
public Type? Type { get; set; }
```

## Remarks

Use this at assembly level to export types you don't own to ATS.
