AspireExportAttribute Constructors
Class Constructors 3 members
Marks a method, type, or assembly-level type as an ATS (Aspire Type System) export.
Constructor(string) Section titled Constructor(string) Initializes a new instance for a capability export (on methods) with an explicit capability ID.
public sealed class AspireExportAttribute{ public AspireExportAttribute( string id) { // ... }}Parameters
id string The capability name for this method. The full capability ID is computed as {AssemblyName}/{id}. Use this overload only when disambiguation is needed (e.g., multiple overloads of the same method). When not specified, the capability ID is automatically derived from the method name using camelCase. Constructor Section titled Constructor Initializes a new instance for a type or method export.
public sealed class AspireExportAttribute{ public AspireExportAttribute() { // ... }}Remarks
For type exports, the type ID is automatically derived as
{AssemblyName}/{TypeName}. Set AspireExportAttribute.ExposeProperties to true for context types whose properties should be exposed as get/set capabilities. For method exports, the capability ID is automatically derived from the method name using camelCase. Constructor(Type) Section titled Constructor(Type) Initializes a new instance for an assembly-level type export.
public sealed class AspireExportAttribute{ public AspireExportAttribute( Type type) { // ... }}Parameters
type Type The CLR type to export to ATS. Remarks
Use this constructor at assembly level for types you don't own. The type ID is derived as
{type.Assembly.Name}/{type.Name}. Examples
[assembly: AspireExport(typeof(IConfiguration))]// Type ID: Microsoft.Extensions.Configuration.Abstractions/IConfiguration