AspireExportAttribute Properties
public string? Description { get; set; }public bool ExposeMethods { get; set; }Remarks
When true, the type's public instance methods are automatically exposed as capabilities (unless marked with AspireExportIgnoreAttribute).
Method capabilities are named as {Package}/{TypeName}.{methodName} (camelCase method name). The first parameter of the capability will be a handle to the instance.
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).
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)
public string? Id { get; }Remarks
The full capability ID is computed as {AssemblyName}/{Id}.
This is null for type exports.
public string? MethodName { get; set; }Remarks
When not specified, the method name from AspireExportAttribute.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.).
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.
public Type? Type { get; set; }